Official Soldat Forums

Server Talk => Scripting Discussions and Help => Topic started by: cynicle on June 02, 2007, 03:43:07 am

Title: Scripting help
Post by: cynicle on June 02, 2007, 03:43:07 am
Hey i need help with this script, the server states theres an error and then disables scripting on the server.

Code: [Select]
function OnCommand(ID: Byte; Text: string): boolean;

begin
ks_OnCommand(ID, Text);   
if Text = '/score' then begin
       SetScore(ID,GetPlayerStat(ID,'Kills')+10);
    // This will add 10 points to player 1's current score
    end;
    Result := false; // Return true if you want to ignore the command typed.
end;
Title: Re: Scripting help
Post by: EnEsCe on June 02, 2007, 04:51:56 am
Paste the error...
Title: Re: Scripting help
Post by: cynicle on June 02, 2007, 07:07:15 am
unfortunatly i don't know what it is :( says it exported a log file but it doesn't
Title: Re: Scripting help
Post by: Avarax on June 02, 2007, 07:16:23 am
show us that ks_OnCommand procedure
Title: Re: Scripting help
Post by: EnEsCe on June 02, 2007, 07:28:29 am
unfortunatly i don't know what it is :( says it exported a log file but it doesn't
You dont need to get the error out of a log file... It says it in the console marked with [ * ]. It will not disable scripting without saying the error in the console.
Title: Re: Scripting help
Post by: cynicle on June 02, 2007, 07:35:01 am
Funny just ran it then to get the error message and it worked :S
It doesn't actually do anything thou... any ideas whats going on