Dialogs
#6

When i un comment the stuff after giveplayer weapon i get errors, This is the new way i'm trying it
pawn Код:
if (dialogid == 3) //checking dialogid
  {
    if (response == 1) //warp has been pressed
    {
      switch (listitem) //a switch, not going to explain it here
      {
        case 0:GivePlayerWeapon(playerid, 24, 50);//AntiHack(playerid, -800);ShowPlayerDialog(playerid, 3, DIALOG_STYLE_LIST, "Gun Menu", "Desert Eagle $800 \nShotgun $350 \nCountry Rifle $350 \nBrass Knuckles $50", "Buy", "Exit");
        case 1:GivePlayerWeapon(playerid, 25, 10);//AntiHack(playerid, -350);ShowPlayerDialog(playerid, 3, DIALOG_STYLE_LIST, "Gun Menu", "Desert Eagle $800 \nShotgun $350 \nCountry Rifle $350 \nBrass Knuckles $50", "Buy", "Exit");
        case 2:GivePlayerWeapon(playerid, 33, 50);//AntiHack(playerid, -350);ShowPlayerDialog(playerid, 3, DIALOG_STYLE_LIST, "Gun Menu", "Desert Eagle $800 \nShotgun $350 \nCountry Rifle $350 \nBrass Knuckles $50", "Buy","Exit");
        case 3:GivePlayerWeapon(playerid, 1, 1);//AntiHack(playerid, -50);ShowPlayerDialog(playerid, 3,DIALOG_STYLE_LIST, "Gun Menu", "Desert Eagle $800 \nShotgun $350 \nCountry Rifle $350 \nBrass Knuckles $50", "Buy","Exit");
      }
      SendClientMessage(playerid, 0xFFFFFFFF, "Gun Purchased"); //a message to confirm the warp
    }
    else //pressed cancel
    {
    TogglePlayerControllable(playerid, 1);
    SetPlayerPos(playerid, 1366.3450,-1278.8975,13.5469);
    SetPlayerInterior(playerid,0);
    }
    return 1; //returns 1, it has been handled
  }
  return 0;
}
Код:
C:\Desktop\sa-mp server\gamemodes\penls.pwn(20708) : error 002: only a single statement (or expression) can follow each "case"
C:\Desktop\sa-mp server\gamemodes\penls.pwn(20708) : warning 215: expression has no effect
C:\Desktop\sa-mp server\gamemodes\penls.pwn(20709) : error 014: invalid statement; not in switch
C:\Desktop\sa-mp server\gamemodes\penls.pwn(20709) : warning 215: expression has no effect
C:\Desktop\sa-mp server\gamemodes\penls.pwn(20709) : error 001: expected token: ";", but found ":"
C:\Desktop\sa-mp server\gamemodes\penls.pwn(20709) : error 029: invalid expression, assumed zero
C:\Desktop\sa-mp server\gamemodes\penls.pwn(20709) : fatal error 107: too many error messages on one line
should i add && to those or how would i go about making so there is more then one thing in a case, Those error is when i un comment the case 0:
Reply


Messages In This Thread
Dialogs - by ihatetn931 - 15.01.2010, 17:21
Re: Dialogs - by ihatetn931 - 18.01.2010, 14:25
Re: Dialogs - by deather - 18.01.2010, 15:28
Re: Dialogs - by ihatetn931 - 18.01.2010, 15:30
Re: Dialogs - by deather - 18.01.2010, 15:36
Re: Dialogs - by ihatetn931 - 18.01.2010, 15:41
Re: Dialogs - by deather - 18.01.2010, 17:13
Re: Dialogs - by ihatetn931 - 18.01.2010, 17:24
Re: Dialogs - by deather - 18.01.2010, 17:25

Forum Jump:


Users browsing this thread: 2 Guest(s)