Author Topic: Server Administration: stopping scripts for randomly crashing?  (Read 893 times)

0 Members and 1 Guest are viewing this topic.

Offline frosty

  • Flagrunner
  • ****
  • Posts: 601
  • Uber Desert Eagle ^^
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
check out my server! click here

If at first you don't succeed, Improvise! :D

DarkCrusade

  • Guest
Re: Server Administration: stopping scripts for randomly crashing?
« Reply #1 on: June 07, 2010, 01:33:31 pm »
I'd recommend posting all the scripts you are using which are causing trouble

Offline frosty

  • Flagrunner
  • ****
  • Posts: 601
  • Uber Desert Eagle ^^
Re: Server Administration: stopping scripts for randomly crashing?
« Reply #2 on: June 07, 2010, 07:51:26 pm »
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)
check out my server! click here

If at first you don't succeed, Improvise! :D

Offline Hacktank

  • Camper
  • ***
  • Posts: 462
  • Soldat Scripter
    • HTZRPG
Re: Server Administration: stopping scripts for randomly crashing?
« Reply #3 on: June 07, 2010, 09:07:31 pm »
It is probably array indexes that are invalid.


Offline Gizd

  • Flagrunner
  • ****
  • Posts: 586
  • (Re)tired
    • Eat-this! community site
Re: Server Administration: stopping scripts for randomly crashing?
« Reply #4 on: June 08, 2010, 06:50:36 am »
It is probably array indexes that are invalid.
It must be.

Offline Swompie

  • Camper
  • ***
  • Posts: 390
Re: Server Administration: stopping scripts for randomly crashing?
« Reply #5 on: June 08, 2010, 09:10:22 am »
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:
Code: [Select]
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