PDA

View Full Version : Script problem..game crashing


[HK]Ryder[AN]
08/11/2012, 04:23 AM
I am getting this with the crashdetect plugin
[11:09:35] [debug] Run time error 4: "Array index out of bounds"
[11:09:35] [debug] Accessing element at index 72 past array upper bound 71
[11:09:35] [debug] AMX backtrace:
[11:09:35] [debug] #0 002dff6c in ?? () from 2r-rp.amx
[11:09:35] [debug] #1 002ad784 in public Itter_OnGameModeInit () from 2r-rp.amx
[11:09:35] [debug] #2 native CallLocalFunction () [00472260] from samp-server.exe
[11:09:35] [debug] #3 000098a0 in public SSCANF_OnGameModeInit () from 2r-rp.amx
[11:09:35] [debug] #4 native CallLocalFunction () [00472260] from samp-server.exe
[11:09:35] [debug] #5 000037e0 in public Streamer_OnGameModeInit () from 2r-rp.amx
[11:09:35] [debug] #6 native CallLocalFunction () [00472260] from samp-server.exe
[11:09:35] [debug] #7 000023d0 in public OnGameModeInit () from 2r-rp.amx
When i go ingame, for a few seconds the textdraws appear then gta_sa crashes.
It started when i added some removebuildingforplayer lines(i have more than 1000 of them) but when i remove around 500 of them(of a specific city) game doesnt crash.
What could be the problem?

DrTHE
08/11/2012, 09:19 AM
You created an array with a specific size and is exceeding this maximum value. :cool:

[HK]Ryder[AN]
09/11/2012, 06:37 AM
but when i remove my RemoveBuildingForPlayer's code it works..

Ballu Miaa
09/11/2012, 07:23 AM
Ryder[AN];2212173']but when i remove my RemoveBuildingForPlayer's code it works..

Maybe there is a limit in Removing Buildings for player. As we were talking on phone about it. I dont think that is possible.

[HK]Ryder[AN]
09/11/2012, 07:27 AM
There is NO limit for remove buildings as i have already told you!

Ballu Miaa
09/11/2012, 07:32 AM
Ryder[AN];2212214']There is NO limit for remove buildings as i have already told you!

There are lot of functions in SA-MP Pawn Scripting Language , which you call them more then 1k times. The server will crash. The server is not able to Remove all those buildings in one go for every player.

JaKe Elite
09/11/2012, 07:54 AM
Or maybe the server client can't remove many objects..

[GF]Logic
09/11/2012, 10:44 AM
The simplest way to find the problem would be to recompile with debug information so you get the exact problem function.


****** can you please illustrate me How to make the Debug mode thing ?!

[HK]Ryder[AN]
10/11/2012, 02:58 AM
by debug mode if you meant adding -d3 to the compiler runtime options.
I have added it and this was my result - Pawn compiler 3.2.3664 Copyright (c) 1997-2006, ITB CompuPhase

Header size: 11008 bytes
Code size: 5845464 bytes
Data size: 17569244 bytes
Stack/heap size: 400000 bytes; estimated max. usage=6345 cells (25380 bytes)
Total requirements:23825716 bytes

To apply this option i created pawn.cfg in the pawno folder and put -d3 -r in it and then compiled the script.

-=Dar[K]Lord=-
10/11/2012, 04:35 AM
the samp team may have added limit to removing the buildings which me you cannot see its inbuilt ...with client update

[HK]Ryder[AN]
10/11/2012, 04:50 AM
please learn to read, there already have been 2 posts on the limit thing

XtremeR
10/11/2012, 08:09 AM
then use RemoveBuilding ;)
http://forum.sa-mp.com/showthread.php?t=390802

Jarnu
10/11/2012, 08:13 AM
Failed XtremeR. you just gave him link of this topic only.

[HK]Ryder[AN]
11/11/2012, 03:27 AM
then use RemoveBuilding ;)
http://forum.sa-mp.com/showthread.php?t=390802

didnt expect this from you XtremeR :/
Bump please

[HK]Ryder[AN]
11/11/2012, 10:11 AM
Um...can you tell me how to do it?

And if you mean testing Ingame, it still crashes

[HK]Ryder[AN]
12/11/2012, 02:34 AM
Bump Please

Camorra
12/11/2012, 03:27 AM
I join you, i have the same isuss and i dont know what worng

[HK]Ryder[AN]
13/11/2012, 03:18 AM
erm..bump please

[HK]Ryder[AN]
14/11/2012, 03:07 AM
I tried to add print lines between my removebuiulding code and the shocking thing was all of them were successfully printed..so the code is being executed..
but crashdetect shows same things
what to do?help please

Camorra
16/11/2012, 10:36 PM
Any one ?