0 Members and 1 Guest are viewing this topic.
procedure OnPlayerCommand(ID: byte; Text: string);beginprocedure WriteLol(Name: string);beginWriteConsole(ID,'You are LOL '+Name,$00AABBCC);end;if Text = 'lol' thenbeginWriteLol(RunMan);end;end;
procedure WriteLol(Name: string);begin WriteConsole(ID,'You are LOL '+Name,$00AABBCC);end;procedure OnPlayerCommand(ID: byte; Text: string);begin if Text = 'lol' then begin WriteLol(RunMan); end;end;
procedure WriteLol(Name: string);begin WriteConsole(0,'You are LOL '+Name,$00AABBCC);end;procedure OnPlayerCommand(ID: byte; Text: string);begin if Text = 'lol' then begin WriteLol('RunMan'); end;end;
elseend;
but now standard commands like /kill, /adminlog, /info don't work.
result := false;
begincase Text of--commands--end;elsebeginresult := falseend;end;
begin case Text of --commands-- end; result := false;end;
And as the lyrics go in the United State's national anthem: "America, f**k YEAH!".
I know that, but it works fine without it...
Thats because variables are default false, 0, or whatever.
now it tells me unknown identifier 'result'
I made a script, everything is good, but now standard commands like /kill, /adminlog, /info don't work.
function OnPlayerCommand(ID: Byte; Text: string): boolean;begin --blabla, whatever here-- Result := false;end;
Quote from: DorkeyDear on April 07, 2008, 05:18:34 amThats because variables are default false, 0, or whatever.not always =F I think its highly recommended to reset your vars because of the nature of the language... Dont know the details, but it does act funny sometimes