21.02.2011, 08:35
I got Errors:
By the way, how can i make it like "Dors are alredy Closed!"
pawn Код:
C:\Users\Marko\Desktop\Vehicle0.3c.pwn(116) : error 014: invalid statement; not in switch
C:\Users\Marko\Desktop\Vehicle0.3c.pwn(116) : warning 215: expression has no effect
C:\Users\Marko\Desktop\Vehicle0.3c.pwn(116) : error 001: expected token: ";", but found ":"
C:\Users\Marko\Desktop\Vehicle0.3c.pwn(116) : error 029: invalid expression, assumed zero
C:\Users\Marko\Desktop\Vehicle0.3c.pwn(116) : fatal error 107: too many error messages on one line
Compilation aborted.Pawn compiler 3.2.3664 Copyright (c) 1997-2006, ITB CompuPhase
4 Errors.
pawn Код:
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
if(response)
{
switch(0)
{
case VEH_DIALOG:
{
switch(listitem)
{
case 0:
{
ShowPlayerDialog(playerid, 1, DIALOG_STYLE_LIST, "{0000FF}Doors", "Open Doors \nClose Doors", "Chose", "Cancel");
}
case 1:
{
ShowPlayerDialog(playerid, 2, DIALOG_STYLE_LIST, "{0000FF}Bonnet", "Open Bonnet \nClose Bonnet", "Chose", "Cancel");
}
case 2:
{
ShowPlayerDialog(playerid, 3, DIALOG_STYLE_LIST, "{0000FF}Boot", "Open Boot \nClose Boot", "Chose", "Cancel");
}
case 3:
{
ShowPlayerDialog(playerid, 4, DIALOG_STYLE_LIST, "{0000FF}Engine", "Turn Off Engine \nTurn On Engine", "Purchase", "Cancel");
}
case 4:
{
ShowPlayerDialog(playerid, 5, DIALOG_STYLE_LIST, "{0000FF}Alarm", "Turn On Alarm \nTurn Off Alarm", "Purchase", "Cancel");
}
case 5:
{
ShowPlayerDialog(playerid, 6, DIALOG_STYLE_LIST, "{0000FF}Objectives", "Turn On Objectives \n Turn Off Objectives", "Purchase", "Cancel");
}
case 6:
{
ShowPlayerDialog(playerid, 7, DIALOG_STYLE_LIST, "{0000FF}Lights", "Lights On \nLights Off", "Purchase", "Cancel");
}
case 7:
{
ShowPlayerDialog(playerid, 8, DIALOG_STYLE_LIST, "{0000FF}Neon Lights", "Red Neon \nBlue Neon \nYellow Neon \nGreen Neon \nWhite Neon \nPink Neon", "Purchase", "Cancel");
}
}
}
}
case DOOR_DIALOG: //errors here
{
if(response)
{
switch(listitem)
{
case 0: //open doors
{
new vid = GetPlayerVehicleID(playerid);
if(vid != INVALID_VEHICLE_ID) {
GetVehicleParamsEx(vid,engine,lights,alarm,doors,bonnet,boot,objective);
SetVehicleParamsEx(vid,engine,lights,alarm,VEHICLE_PARAMS_ON,bonnet,boot,objective);
}
case 1: //close doors
{
if(strcmp(cmd, "/closedoors",true) == 0) {
new vid = GetPlayerVehicleID(playerid);
if(vid != INVALID_VEHICLE_ID) {
GetVehicleParamsEx(vid,engine,lights,alarm,doors,bonnet,boot,objective);
SetVehicleParamsEx(vid,engine,lights,alarm,VEHICLE_PARAMS_OFF,bonnet,boot,objective);
}
}
}
else SendClientMessage(playerid, 0xff0000AA, "SERVER: Doors are closed.");
}
}
return 1;
}