05.03.2013, 04:05
Can someone fix this!
Please
I get this errors!
Please
pawn Код:
#include <a_samp>
#include <zcmd>
#define orange 0xFF9900AA
CMD:Teleports(playerid, params[])
{
ShowPlayerDialog(playerid, 1, DIALOG_STYLE_LIST, "Teleports:", "Stunts\nJumps", "Ok", "Cancel");
return 1;
}
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
if(response)
{
switch(dialogid)
{
case 1:
{
switch(listitem)
{
case 0:
{
ShowPlayerDialog(playerid, 2, DIALOG_STYLE_LIST, "Stunts:", "Lsa\nLva\nSfa", "Ok", "Cancel");
}
case 1:
{
ShowPlayerDialog(playerid, 3, DIALOG_STYLE_LIST, "Jumps:", "/Vj-Vulcano Jump\n/Cj-Cliff Jump\n/Pipe-Pipe Jump", "Ok", "Cancel");
}
}
return 0;
}
switch(dialogid)
{
case 2:
{
switch(listitem)
{
case 0:
{
SetPlayerInterior(playerid,0);
SetPlayerPos(playerid,1926.0984,-2248.9475,16.4303);
GameTextForPlayer(playerid,"~g~Los ~p~Santos ~b~Airport",4000,5);
new string[256], pname[MAX_PLAYER_NAME];
GetPlayerName(playerid, pname, sizeof(pname));
format(string, sizeof(string), "** %s has teleported to Los Santos Airport (/lsa).", pname);
SendClientMessageToAll(orange, string);
new vehicleid = GetPlayerVehicleID(playerid);
SetVehiclePos(vehicleid, 1960.8390,-2264.5425,13.5469);
PutPlayerInVehicle(playerid, vehicleid, 0);
SetPlayerFacingAngle(playerid, 183.9178);
}
case 1:
{
SetPlayerInterior(playerid,0);
SetPlayerPos(playerid,1615.1976,1163.9318,14.2188);
GameTextForPlayer(playerid,"~g~Las ~p~Venturas ~b~Airport",4000,5);
new string[256], pname[MAX_PLAYER_NAME];
GetPlayerName(playerid, pname, sizeof(pname));
format(string, sizeof(string), "** %s has teleported to Las Venturas Airport (/lva). ", pname);
SendClientMessageToAll(orange, string);
new vehicleid = GetPlayerVehicleID(playerid);
SetVehiclePos(vehicleid, 1647.5516,1599.1432,10.8203);
PutPlayerInVehicle(playerid, vehicleid, 0);
SetPlayerFacingAngle(playerid, 14.0895);
}
case 2:
{
SetPlayerInterior(playerid,0);
SetPlayerPos(playerid,-1185.4948,27.0993,14.1484);
GameTextForPlayer(playerid,"~g~San ~p~Fiego ~b~Airport",4000,5);
new string[256], pname[MAX_PLAYER_NAME];
GetPlayerName(playerid, pname, sizeof(pname));
format(string, sizeof(string), "** %s has teleported to San Fiego Airport (/sfa). ", pname);
SendClientMessageToAll(orange, string);
new vehicleid = GetPlayerVehicleID(playerid);
SetVehiclePos(vehicleid, -1254.2469,36.7461,14.1402);
PutPlayerInVehicle(playerid, vehicleid, 0);
return 1;
}
if(response)
{
switch(dialogid)
{
case 3:
{
switch(listitem)
{
case 0:
{
SetPlayerInterior(playerid,0);
SetPlayerPos(playerid,2053.6147,1556.6315,720.7741);
GameTextForPlayer(playerid,"~g~Vulcano ~p~Jump ~b~!!!",4000,5);
new string[256], pname[MAX_PLAYER_NAME];
GetPlayerName(playerid, pname, sizeof(pname));
format(string, sizeof(string), "** %s has teleported to Vulcano Jump (/vj).", pname);
new vehicleid = GetPlayerVehicleID(playerid);
SetVehiclePos(vehicleid, 2053.6147,1556.6315,720.7741);
PutPlayerInVehicle(playerid, vehicleid, 0);
SetPlayerFacingAngle(playerid, 358.7228);
}
case 1:
{
SetPlayerInterior(playerid,0);
SetPlayerPos(playerid,-3832.4019,2686.4294,704.1697);
GameTextForPlayer(playerid,"~g~Cliff ~p~Jump ~b~!!!",4000,5);
new string[256], pname[MAX_PLAYER_NAME];
GetPlayerName(playerid, pname, sizeof(pname));
format(string, sizeof(string), "** %s has teleported to Cliff Jump (/cj).", pname);
new vehicleid = GetPlayerVehicleID(playerid);
SetVehiclePos(vehicleid, -3832.4019,2686.4294,704.1697);
PutPlayerInVehicle(playerid, vehicleid, 0);
SetPlayerFacingAngle(playerid, 263.5099);
}
case 2:
{
SetPlayerInterior(playerid,0);
SetPlayerPos(playerid,1394.7571,-2425.7009,525.6313);
GameTextForPlayer(playerid,"~g~Pipe ~p~!!!",4000,5);
new string[256], pname[MAX_PLAYER_NAME];
GetPlayerName(playerid, pname, sizeof(pname));
format(string, sizeof(string), "** %s has teleported to Pipe (/pipe). ", pname);
SendClientMessageToAll(orange, string);
new vehicleid = GetPlayerVehicleID(playerid);
SetVehiclePos(vehicleid, 1394.7571,-2425.7009,525.6313);
PutPlayerInVehicle(playerid, vehicleid, 0);
SetPlayerFacingAngle(playerid, 269.3985);
return 0;
}
pawn Код:
filterscripts\myscript.pwn(32 -- 34) : fatal error 107: too many error messages on one line
filterscripts\myscript.pwn(32 -- 34) : error 001: expected token: "}", but found "case"
filterscripts\myscript.pwn(32 -- 33) : error 028: invalid subscript (not an array or too many subscripts): "dialogid"
filterscripts\myscript.pwn(32) : error 002: only a single statement (or expression) can follow each "case"