Official Soldat Forums
Server Talk => Scripting Discussions and Help => Topic started by: Hubiq on May 06, 2017, 09:45:23 am
-
My script doesn't work :-\ Where is the mistake?
procedure OnPlayerSpeak(ID: Byte; Text: string);
begin
if (Text='!cmds1') then begin
WriteConsole(ID, '!teams, !balance', $33ccff);
end;
if (Text='!cmds2') then begin
WriteConsole(ID, '!alpha, !bravo, !spec', $33ff66);
end;
-
Missing end; after second if statement? I'm not programming in Pascal but it would make sense to me as I code a little bit in M Script.
procedure OnPlayerSpeak(ID: Byte; Text: string);
begin
if (Text='!cmds1') then begin
WriteConsole(ID, '!teams, !balance', $33ccff);
end;
if (Text='!cmds2') then begin
WriteConsole(ID, '!alpha, !bravo, !spec', $33ff66);
end; // <--------------------- could this be missing?
end;
-
thanks :D
-
thanks :D
You should probably get better IDE that would highlight such errors for your work as it is rather a simple mistake.
-
thanks :D
Get Lazarus IDE, its what Im using now and can help you find mistakes like that easily.
-
notepad is for experts. I agree 110% ;D
Get Lazarus IDE, its what Im using now and can help you find mistakes like that easily.