05.02.2011, 12:20
i got a menu works tryed adding another and befour i got to adding explosions etc i get errors
heres code
and errors
thanks
heres code
Код:
public OnPlayerSelectedMenuRow(playerid, row) { new Menu:CurrentMenu = GetPlayerMenu(playerid); if(CurrentMenu == grovenuke) { switch(row) { case 0: { if(ballascode[playerid] == 1) { TogglePlayerControllable(playerid,1); ballascode[playerid] = 0; CreateExplosion(2167.7194,-1672.9709,15.0814, 2, 1000); CreateExplosion(2172.4052,-1678.5672,15.0859, 2, 1000); CreateExplosion(2176.7900,-1672.4990,14.9377, 2, 1000); CreateExplosion(2180.1613,-1666.3145,14.7828, 2, 1000); CreateExplosion(2181.7062,-1659.5869,15.0043, 2, 1000); CreateExplosion(2179.7614,-1654.0753,15.1473, 2, 1000); CreateExplosion(2187.3164,-1668.3552,14.5142, 2, 1000); CreateExplosion(2183.4907,-1681.1914,13.9066, 2, 1000); CreateExplosion(2178.4172,-1684.1645,13.8794, 2, 1000); CreateExplosion(2171.8811,-1686.6689,14.9252, 2, 1000); CreateExplosion(2166.4226,-1690.7932,15.0859, 2, 1000); CreateExplosion(2168.8947,-1696.6138,15.0859, 2, 1000); CreateExplosion(2162.1887,-1686.5587,15.9245, 2, 1000); CreateExplosion(2156.0266,-1679.8973,19.8945, 2, 1000); CreateExplosion(2157.3093,-1677.7985,22.0297, 2, 1000); CreateExplosion(2158.5129,-1673.7336,22.0297, 2, 1000); CreateExplosion(2161.7165,-1664.9716,22.0297, 2, 1000); CreateExplosion(2166.0073,-1660.9862,22.0297, 2, 1000); CreateExplosion(2169.0812,-1663.4804,22.0297, 2, 1000); CreateExplosion(2174.8674,-1658.4702,22.0297, 2, 1000); CreateExplosion(2178.4443,-1656.5579,19.7714, 2, 1000); CreateExplosion(2185.9990,-1661.5953,19.3295, 2, 1000); new pname[MAX_PLAYER_NAME], string[22 + MAX_PLAYER_NAME]; GetPlayerName(playerid, pname, sizeof(pname)); format(string, sizeof(string), "%s Has Launched A Nuke On Ballas House!", pname); SendClientMessageToAll(0xAAAAAAAA, string); SendClientMessage(playerid,0xFF0000FF,"Launch Code Has Been Used!"); } else { TogglePlayerControllable(playerid,1); SendClientMessage(playerid,0xFF0000FF,"You Need The Ballas Launch Codes!"); } } if(CurrentMenu == grovenuke) { switch(row) { case 0: { if(grovecode[playerid] == 1) { //code } } } return 1; }
Код:
C:\Users\Stephen-Laptop\Desktop\server samp\gamemodes\gangwar.pwn(573) : error 002: only a single statement (or expression) can follow each "case" C:\Users\Stephen-Laptop\Desktop\server samp\gamemodes\gangwar.pwn(573 -- 574) : error 028: invalid subscript (not an array or too many subscripts): "CurrentMenu" C:\Users\Stephen-Laptop\Desktop\server samp\gamemodes\gangwar.pwn(573 -- 575) : error 001: expected token: "}", but found "switch" C:\Users\Stephen-Laptop\Desktop\server samp\gamemodes\gangwar.pwn(573 -- 575) : fatal error 107: too many error messages on one line Compilation aborted.Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase 4 Errors.