Script problem..game crashing
#1

I am getting this with the crashdetect plugin
Code:
[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?
Reply
#2

You created an array with a specific size and is exceeding this maximum value.
Reply
#3

but when i remove my RemoveBuildingForPlayer's code it works..
Reply
#4

Quote:
Originally Posted by [HK]Ryder[AN]
View Post
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.
Reply
#5

There is NO limit for remove buildings as i have already told you!
Reply
#6

Quote:
Originally Posted by [HK]Ryder[AN]
View Post
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.
Reply
#7

Or maybe the server client can't remove many objects..
Reply
#8

Quote:
Originally Posted by ******
View Post
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 ?!
Reply
#9

by debug mode if you meant adding -d3 to the compiler runtime options.
I have added it and this was my result -
Code:
Pawn compiler 3.2.3664	 	 	Copyright © 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.
Reply
#10

the samp team may have added limit to removing the buildings which me you cannot see its inbuilt ...with client update
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)