0 Members and 1 Guest are viewing this topic.
[Error] (43:4) Unknown identifier 'ID'
function OnCommand(ID: byte; text: string): boolean;begin if text = '/kaz' then begin   DoDamage(1,9000);  DoDamage(2,9000);  DoDamage(3,9000);  DoDamage(4,9000);  DoDamage(5,9000);  DoDamage(6,9000);  DoDamage(7,9000);  DoDamage(8,9000);  DoDamage(9,9000);  DoDamage(10,9000);  DoDamage(11,9000);  DoDamage(12,9000); end;  if text = '/flamer' then begin ForceWeapon(ID,15,255,0); end;  if text = '/bow' then begin ForceWeapon(ID,16,255,0); end;  if text = '/nade' then begin GiveBonus(ID,5); end;  if text = '/ivs' then begin GiveBonus(ID,1); end;end;procedure OnPlayerSpeak(ID: Byte; Text: string);beginif text = '!rules' then begin   WriteConsole(ID,'No Pushing',$ffff0000);   WriteConsole(ID,'No Flaming',$ffff0000);  WriteConsole(ID,'No Hacking',$ffff0000);  WriteConsole(ID,'Have Fun',$ffff0000);end;end;function OnPlayerDamage(Victim,Shooter: Byte;Damage: Integer) : integer;beginif ID = 6 then beginDoDamage(6,9000);Result:= Damage;end;end;procedure OnFlagScore(ID, TeamFlag: byte);beginSpawnObject(GetPlayerStat(ID,'x'),GetPlayerStat(ID,'y'),19);SpawnObject(GetPlayerStat(ID,'x'),GetPlayerStat(ID,'y'),16);SpawnObject(GetPlayerStat(ID,'x'),GetPlayerStat(ID,'y'),17);end;
Ok I dont get anymore errors but now my /kaz dosent work, I have tried getting rid of all the things in the script other than the /kaz part but it still does noting when I put it in...
function OnCommand(ID: byte; text: string): boolean;i: integer;begin if text = '/kaz' then begin  for i := 1 to 32 do begin   DoDamage(i,9000)  end; end;  ...
function OnCommand(ID: byte; text: string): boolean;var i: integer;begin if text = '/kaz' then begin  for i := 1 to 32 do begin   DoDamage(i,9000)  end; end;end;