Official Soldat Forums
Server Talk => Scripting Discussions and Help => Topic started by: frosty on June 07, 2010, 01:07:44 pm
-
a few of my scripts just crash randomly, i would get a whole heap of Out Of Range messages for the script thats gonna crash then i crashes, problem is, all of the vars in the function specified by the error are all integars, so wth is causing all my vars to get so big? any ideas? would the problem be elsewhere in the script? anything in particular i need to look out for?
thanks guys
-
I'd recommend posting all the scripts you are using which are causing trouble
-
ok heres my shop script:Shop.pas(attached), that is the only one currently crashing, the rest seemed to have sorted themselves out with the exception of Achievement.pas(attached)
-
It is probably array indexes that are invalid.
-
It is probably array indexes that are invalid.
It must be.
-
It is probably array indexes that are invalid.
It must be.
Sometimes other stuff seems to be causing that too iirc, but really rarely.
Even though, I now need to WTF:
procedure ActivateServer();
begin
BioKills[Killer]:=BioKills[Killer]*0;
end;
Next thing, do not use ID as a global var (If you use your brain you know what may can happen >_>)
Also you need to check if a player is active before doing something.. (AppOnIdle.., aswell everywhere else in the loops)
Also take a look at your indenting, looks horrible at some places