Author Topic: Spawning script  (Read 829 times)

0 Members and 1 Guest are viewing this topic.

Offline BurnedKirby

  • Major(1)
  • Posts: 39
Spawning script
« on: August 23, 2007, 03:17:27 pm »
I wanted to summon up a healthkit whenever I wanted to but this simple script isn't working.

procedure OnPlayerSpeak(ID: byte; Text: string);
begin
if (Text = '!health') then begin
SpawnObject(GetPlayerStat(ID,'x'),GetPlayerStat(ID,'y'),16);
end;
end;

I simply can't figure out how to fix it, because When I try running it, my dedicated server crashes on start.
I have implemented the script correctly in a different folder, and made an 'Includes.txt' with the name of the pas file.

Offline ghg

  • Camper
  • ***
  • Posts: 411
  • Village Idiot
Re: Spawning script
« Reply #1 on: August 23, 2007, 03:24:26 pm »
The script its looks fine, I think you've implemented it wrong, maybe you have 2 copies of the OnPlayerSpeak. Try and get a Print Screen of the error.
-=Gradius wuz you=-

Offline BurnedKirby

  • Major(1)
  • Posts: 39
Re: Spawning script
« Reply #2 on: August 23, 2007, 03:32:33 pm »
I cant get a screenshot of the error because it closes too fast. But i have a screenshot of my text.

Offline Toumaz

  • Veteran
  • *****
  • Posts: 1904
Re: Spawning script
« Reply #3 on: August 23, 2007, 03:34:21 pm »
Run the dedicated server from a command window (Start, Run, cmd, make your way to the Soldatserver directory and then type soldatserver), find out what the exact error is, and tell it to us here.

Offline BurnedKirby

  • Major(1)
  • Posts: 39
Re: Spawning script
« Reply #4 on: August 23, 2007, 03:37:17 pm »
hmm... I've managed to somehow fix it myself. I accidentally edited the core.pas file, but I fixed it. Sorry for the stupid not really error thing. please carry on and lock this topic.