HELP, DIALOG.
#1

pawn Код:
C:\Users\Ross\Desktop\G2x andreas\gamemodes\G2x_Freeroam.pwn(126) : error 002: only a single statement (or expression) can follow each "case"
C:\Users\Ross\Desktop\G2x andreas\gamemodes\G2x_Freeroam.pwn(126) : warning 215: expression has no effect
C:\Users\Ross\Desktop\G2x andreas\gamemodes\G2x_Freeroam.pwn(127) : warning 209: function "OnDialogResponse" should return a value
Pawn compiler 3.2.3664          Copyright (c) 1997-2006, ITB CompuPhase


1 Error.
pawn Код:
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
    switch(dialogid)
    {
        case 1:
        {
            if(!response)
            {
                SendClientMessage(playerid, COLOR_RED, "You cancelled!");
                return 1;
            }
            switch(listitem)
            {
                case 0:
                {
                if(GetPlayerMoney(playerid) < 1000) return SendClientMessage(playerid, COLOR_RED, "You cannot afford this!");
                    else {
                    new Float:X, Float:Y, Float:Z, Float:ROT;
                    GetPlayerPos(playerid,X,Y,Z);
                    GetPlayerFacingAngle (playerid,ROT);
                    SpawnedVehicles[playerid] = CreateVehicle(400,X,Y,Z,ROT,-1,-1,60);
                }
            }
         }
    return 1;
}
HMMM... please help?
Reply
#2

BUMP!?!? please help?
Reply
#3

You're missing a closing bracket for else.

EDIT: In fact, you could simply remove the "else {" altogether and remain with same functionality and remove the errors.
Reply
#4

Oh okay, thanks!
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)