SA-MP Forums Archive
What is the problem? - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: What is the problem? (/showthread.php?tid=134037)



What is the problem? - ColdXX - 14.03.2010

Hey guys i have a problem here :
pawn Код:
//=================================/boat========================================
    if(strcmp(cmdtext,"/boat",true)==0)
    {
  new rand;
    rand = random(1);
    rand++
    switch ( rand )
    {
    case 1: SetPlayerPos(playerid, 162.2176,3960.2290,10.1294);
    case 2: SetPlayerPos(playerid, 163.6806,3965.2693,9.6368);
    }
    SetPlayerPos(playerid,-1392.0121,1488.0516,1.8672);
    SetPlayerInterior(playerid,0);
    SetPlayerHealth(playerid,100);
    SetPlayerArmour(playerid,100);
    ResetPlayerWeapons(playerid);
    SendClientMessage(playerid,COLOR_GREEN,"~~~~~~~~~~~~~");
    SendClientMessage(playerid,COLOR_GREEN,"~.:Boat DM:.~");
    SendClientMessage(playerid,COLOR_GREEN,"~Find The Deagles And Wack Your Oponent~");
  new name[MAX_PLAYER_NAME];
    GetPlayerName(playerid,name,MAX_PLAYER_NAME);
    format(msg,sizeof(msg),"%s [%i] has teleported to Boat DM!~[/boat]",name,playerid);
    SendClientMessageToAll(COLOR_YELLOW,msg);
    return 1;
    }
And I get this error:
Код:
 error 001: expected token: ";", but found "switch"
Thanks In Advance


Re: What is the problem? - Carlton - 14.03.2010

You forgot the ; after rand++


Re: What is the problem? - ColdXX - 14.03.2010

omg rofl...fuck em ...thanks ...haahah how could i miss that ..XD