24.11.2010, 15:11
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;
}