../gamemodes/include/OnCommand.pwn(6) : error 014: invalid statement; not in switch ../gamemodes/include/OnCommand.pwn(6) : warning 215: expression has no effect ../gamemodes/include/OnCommand.pwn(6) : warning 215: expression has no effect ../gamemodes/include/OnCommand.pwn(6) : warning 215: expression has no effect ../gamemodes/include/OnCommand.pwn(6) : warning 215: expression has no effect ../gamemodes/include/OnCommand.pwn(6) : error 001: expected token: ";", but found ":" ../gamemodes/include/OnCommand.pwn(6) : error 029: invalid expression, assumed zero ../gamemodes/include/OnCommand.pwn(6) : fatal error 107: too many error messages on one line
CMD:changeskin(playerid) // CMD for calling a change skin
{
case 0,1,2,3://GROVE
{
if(classid == 0 || classid == 1 || classid == 2)
{
ShowModelSelectionMenu(playerid, skingrove, "Select skin for grove");
}
}
case 4,5,6://LSPD
{
if(classid == 3 || classid == 4 || classid == 5 || classid == 6)
{
ShowModelSelectionMenu(playerid, skinpolice, "Select skin for police");
}
}
case 7,8,9://VAGOS
{
if(classid == 7 || classid == 8 || classid == 9)
{
ShowModelSelectionMenu(playerid, skingrove, "Select skin for vagos");
}
}
case 10,11,12,13://BALLAS
{
if(classid == 10 || classid == 11 || classid == 12)
{
ShowModelSelectionMenu(playerid, skinballas, "Select skin for grove");
return 1;
}
}
}
switch(something)
{
case 0:
{
// ...
}
case 1:
{
// ...
}
}
pawn Код:
|
../gamemodes/include/OnCommand.pwn(6) : error 017: undefined symbol "classid"
../gamemodes/include/OnCommand.pwn(10) : error 017: undefined symbol "classid"
../gamemodes/include/OnCommand.pwn(17) : error 017: undefined symbol "classid"
../gamemodes/include/OnCommand.pwn(24) : error 017: undefined symbol "classid"
../gamemodes/include/OnCommand.pwn(31) : error 017: undefined symbol "classid"
I get this now lol
PHP код:
|
new PlayerClass[MAX_PLAYERS];
public OnPlayerRequestClass(playerid,classid)
{
PlayerClass[playerid] = classid;
}
new classid = PlayerClass[Playerid];
switch(classid)
{
case 0,1,2,3://GROVE
{
if(classid == 0 || classid == 1 || classid == 2)
{
ShowModelSelectionMenu(playerid, skingrove, "Select skin for grove");
}
}
}