07.04.2009, 11:48
ok
no more crashes
only errors
here are the errors that are given
its sorta easy and confusing at the same time
:P :S
no more crashes
only errors
pawn Код:
#include <a_samp>
new Menu:occupation;
public OnGameModeInit();
occupation = CreateMenu("occupation", 2, 200.0, 100.0, 150.0, 150.0);
AddMenuItem(occupation, 0, "LSPD");
AddMenuItem(occupation, 0, "SFPD");
AddMenuItem(occupation, 0, "LVPD");
AddMenuItem(occupation, 0, "BCPD");
AddMenuItem(occupation, 0, "BCPD");
AddMenuItem(occupation, 0, "SAPD");
AddMenuItem(occupation, 1, "select");
AddMenuItem(occupation, 1, "select");
AddMenuItem(occupation, 1, "select");
AddMenuItem(occupation, 1, "select");
AddMenuItem(occupation, 1, "select");
AddMenuItem(occupation, 1, "select");
}
return;
}
public OnPlayerSelectedMenuRow(playerid, row)
new Menu:CurrentMenu = GetPlayerMenu(playerid);
{
if(CurrentMenu == occupation)
{
switch(row)
{
case 0: //LSPD
{
SetPlayerSkin( playerid, 280 );
SendClientMessage(playerid, 0xFFFFFFFF, "You are now in Los Santos Police");
}
case 1: //SFPD
{
SetPlayerSkin( playerid, 281 );
SendClientMessage(playerid, 0xFFFFFFFF, "You are now in San Fierro Police");
}
case 2: //BCPD
{
SetPlayerSkin( playerid, 282 );
SendClientMessage(playerid, 0xFFFFFFFF, "You are now in Las Venturas Police");
}
case 3: //BCPD
{
SetPlayerSkin( playerid, 283 );
SendClientMessage(playerid, 0xFFFFFFFF, "You are now in Bone County Police");
}
case 4: //BCPD
{
SetPlayerSkin( playerid, 288 );
SendClientMessage(playerid, 0xFFFFFFFF, "You are now in Bone County Police");
}
case 5: //SAPD
{
SetPlayerSkin( playerid, 284 );
SendClientMessage(playerid, 0xFFFFFFFF, "You are now in San Andreas Police");
}
}
}
return 1;
}
public OnPlayerCommandText(playerid, cmdtext[])
{
if(strcmp(cmdtext, "/select", true) == 0)
{
ShowMenuForPlayer(occupation, playerid);
return;
}
}
public OnPlayerExitedMenu(playerid)
{
TogglePlayerControllable(playerid, 1);
return 1;
}
#endif
here are the errors that are given
Код:
(10) : error 010: invalid function or declaration (24) : error 010: invalid function or declaration (28) : error 003: declaration of a local variable must appear in a compound block (30) : error 010: invalid function or declaration (32) : error 010: invalid function or declaration (34) : error 010: invalid function or declaration (39) : error 010: invalid function or declaration (44) : error 010: invalid function or declaration (49) : error 010: invalid function or declaration (54) : error 010: invalid function or declaration (59) : error 010: invalid function or declaration (66) : error 010: invalid function or declaration (82) : error 026: no matching "#if..." Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase 13 Errors.
:P :S