0 Members and 5 Guests are viewing this topic.
//SNIPER TRAINER script v1//Made by [DOT] or on the forums.soldat.pl, a foolProcedure OnPlayerCommand(ID: Byte; Text: string): boolean;If RegExpMatch('/level \d+', Text) ThenBegin lvlID := StrToInt(GetPiece(Text, ' ', 1)); if not lvlID then WriteConsole(ID, 'You have not entered a valid number, type /help1 and /help2 for help', $FF7F7F7F) else if lvlID = 1 then begin //nothing yet end else if lvlID = 2 then begin //nothing yet end else if lvlID = 3 then begin //nothing yet endendelse if RegExpMatch('/help1', Text) thenbegin WriteConsole(ID, 'Help----------------------------------------------------------', $FF7F7F7F); WriteConsole(ID, 'type /level #, # being the number of the level of difficulty', $FF00FFFF); WriteConsole(ID, 'Level index---------------------------------------------------', $FF7F7F7F); WriteConsole(ID, 'Level 1: Simple map, non moving targets.', $FF0000FF); WriteConsole(ID, 'Level 2: Simple map, moving targets.', $FF007FFF); WriteConsole(ID, 'Level 3: More complex map, non moving targets.', $FF00FFFF); WriteConsole(ID, 'Level 4: More complex map, moving targets.', $FF00FF7F); WriteConsole(ID, 'Level 5: Rather complex map, non moving targets.', $FF00FF00); WriteConsole(ID, 'Level 6: Rather complex map, moving targets.', $FF7FFF00); WriteConsole(ID, 'Level 7: Special level, you cant move, but the targets either.', $FFFFFF00); WriteConsole(ID, 'Level 8: Special level, you cant move, but the targets can.' $FFFF7F00); WriteConsole(ID, 'Level 9: Special level, you just fall and the targets cant move.' $FFFF0000); WriteConsole(ID, 'About---------------------------------------------------------', $FF7F7F7F); WriteConsole(ID, 'Script \"SNIPER TRAINER\" created by [DOT], version 1', $FF7F7F7F); WriteConsole(ID, 'Contact to Game_a_gogo@hotmail.com', $FF7F7F7F)end;
you forgot many ;
//SNIPER TRAINER script v1//Made by [DOT] or on the forums.soldat.pl, a foolProcedure OnPlayerCommand(ID: Byte; Text: string): boolean;case Text of '/level 1': begin //nothing yet end; '/level 2': begin //nothing yet end; '/level 3': begin //nothing yet end; '/level 4': begin //nothing yet end; '/level 5': begin //nothing yet end; '/level 6': begin //nothing yet end; '/level 7': begin //nothing yet end; '/level 8': begin //nothing yet end; '/level 9': begin //nothing yet end; otherwise begin //nothing yet end;end;if Text = '/help1' thenbegin WriteConsole(ID, 'Help----------------------------------------------------------', $FF7F7F7F); WriteConsole(ID, 'type /level #, # being the number of the level of difficulty', $FF00FFFF); WriteConsole(ID, 'Level index---------------------------------------------------', $FF7F7F7F); WriteConsole(ID, 'Level 1: Simple map, non moving targets.', $FF0000FF); WriteConsole(ID, 'Level 2: Simple map, moving targets.', $FF007FFF); WriteConsole(ID, 'Level 3: More complex map, non moving targets.', $FF00FFFF); WriteConsole(ID, 'Level 4: More complex map, moving targets.', $FF00FF7F); WriteConsole(ID, 'Level 5: Rather complex map, non moving targets.', $FF00FF00); WriteConsole(ID, 'Level 6: Rather complex map, moving targets.', $FF7FFF00); WriteConsole(ID, 'Level 7: Special level, you cant move, but the targets either.', $FFFFFF00); WriteConsole(ID, 'Level 8: Special level, you cant move, but the targets can.' $FFFF7F00); WriteConsole(ID, 'Level 9: Special level, you just fall and the targets cant move.' $FFFF0000); WriteConsole(ID, 'About---------------------------------------------------------', $FF7F7F7F); WriteConsole(ID, 'Script "SNIPER TRAINER" created by [DOT], version 1', $FF7F7F7F); WriteConsole(ID, 'Contact to Game_a_gogo@hotmail.com', $FF7F7F7F);end;
Quote from: rumpel on July 02, 2008, 12:15:09 pmyou forgot many ;Phail, he didn'ta fool, pascal manual is your help ^_^
WriteConsole(ID, 'Level 8: Special level, you cant move, but the targets can.' $FFFF7F00);WriteConsole(ID, 'Level 9: Special level, you just fall and the targets cant move.' $FFFF0000);
//SNIPER TRAINER script v1//Made by [DOT] or on the forums.soldat.pl, a foolfunction OnPlayerCommand(ID: byte; Text: string): boolean;beginbeginif Text = '/level 1' then begin //nothing yet endelse if Text = '/level 2' then begin //nothing yet endelse if Text = '/level 3' then begin //nothing yet endelse if Text = '/level 4' then begin //nothing yet endelse if Text = '/level 5' then begin //nothing yet endelse if Text = '/level 6' then begin //nothing yet endelse if Text = '/level 7' then begin //nothing yet endelse if Text = '/level 8' then begin //nothing yet end else if Text = '/level 9' then begin //nothing yet end;end;if Text = '/help1' thenbegin WriteConsole(ID, 'Help----------------------------------------------------------', $FF7F7F7F); WriteConsole(ID, 'type /level #, # being the number of the level of difficulty', $FF00FFFF); WriteConsole(ID, 'Level index---------------------------------------------------', $FF7F7F7F); WriteConsole(ID, 'Level 1: Simple map, non moving targets.', $FF0000FF); WriteConsole(ID, 'Level 2: Simple map, moving targets.', $FF007FFF); WriteConsole(ID, 'Level 3: More complex map, non moving targets.', $FF00FFFF); WriteConsole(ID, 'Level 4: More complex map, moving targets.', $FF00FF7F); WriteConsole(ID, 'Level 5: Rather complex map, non moving targets.', $FF00FF00); WriteConsole(ID, 'Level 6: Rather complex map, moving targets.', $FF7FFF00); WriteConsole(ID, 'Level 7: Special level, you cant move, but the targets either.', $FFFFFF00); WriteConsole(ID, 'Level 8: Special level, you cant move, but the targets can.', $FFFF7F00); WriteConsole(ID, 'Level 9: Special level, you just fall, but the targets cant move.', $FFFF0000); WriteConsole(ID, 'About---------------------------------------------------------', $FF7F7F7F); WriteConsole(ID, 'Script SNIPER TRAINER created by [DOT], version 1', $FF7F7F7F); WriteConsole(ID, 'Contact to Game_a_gogo@hotmail.com', $FF7F7F7F);end;Result := false;end;
and what is "otherwise" ?
case 'test' of 'one': WriteLn('1'); 'two': WriteLn('21'); else begin WriteLn('0'); end;end;
was making the thing fail the compile... but what the heck, I rewritten the same thing and it worked O,,oa mistery... but anyways, it works. here it is:
Quote from: a fool on July 02, 2008, 04:32:32 pmwas making the thing fail the compile... but what the heck, I rewritten the same thing and it worked O,,oa mistery... but anyways, it works. here it is:not a mystery, you forgot a ' , '