AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   strange runtime errors with crash (https://forums.alliedmods.net/showthread.php?t=13214)

Belsebub 05-08-2005 08:45

strange runtime errors with crash
 
i get some strange runtime errors with a crash on a plugin im working with
it crashes when i die if XtraSpawn is true and Respawnible is true

the error i get in the logs:

Code:
[AMXX]Run time error 3 (stack error) on line 249 (file "skills.sma"). [AMXX]Run time error 3 (stack error) on line 254 (file "skills.sma"). SZ_GetSpace: overflow on netchan->message

after the error it crashes with this message:

Code:

Fatal error - Dedicated server

SZ_GetSpace: overflow without FSB_ALLOWOVERFLOW set on Server Reliable Datagram

and here is the piece of code it crashes on:

Code:
public Event_DeathMsg() {     new victim = read_data(2)//Line 249     if (XtraSpawn[victim] == true && Respawnible[victim] == true) {         spawn(victim)         set_task(0.5,"spawnagain",victim)//Line 254         Respawnible[victim] = false     }     return PLUGIN_CONTINUE } public spawnagain(id) {     spawn(id)     return PLUGIN_CONTINUE }

if you need i can send the whole code

v3x 05-08-2005 08:59

Try this:
Code:
public Event_DeathMsg() {     new victim = read_data(2)     new parm[2]     parm[0] = victim     if (XtraSpawn[victim]) {         if(Respawnible[victim]) {                 set_task(0.5,"spawnagain",_,parm,1)                 set_task(0.7,"spawnagain",_,parm,1)                 Respawnible[victim] = false         }     }     return PLUGIN_CONTINUE } public spawnagain(parm[1]) {     spawn(parm[0]) }

[EDIT]
Hopefully outside of your function, it looks something like this:
Code:
new bool:Respawnible[33]

Belsebub 05-08-2005 09:44

thanks v3x, and yea it looks like that :D

v3x 05-08-2005 09:55

No more crashy error crap?

Belsebub 05-08-2005 10:02

nope :P


All times are GMT -4. The time now is 16:47.

Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.