Nabend,
Ich versuche gerade für mein /stats befehl eien Rankanzeige für die jeweilige Fraktion zu machen.
Habe es so versucht.
new rankname[128];
switch(PlayerInfo[playerid][Rank])
{
if(PlayerInfo[playerid][Leader] == 0) // Zeile 1828
{
case 0:{rankname="Keiner";} //Zeile 1830
}
else if(PlayerInfo[playerid][Leader] == 1)
{
case 0:{rankname=rankname10;}
case 1:{rankname=rankname11;}
case 2:{rankname=rankname12;}
case 3:{rankname=rankname13;}
case 4:{rankname=rankname14;}
case 5:{rankname=rankname15;}
case 6:{rankname=rankname16;}
case 7:{rankname=rankname17;}
}
else if(PlayerInfo[playerid][Leader] == 2)
{
case 0:{rankname=rankname20;}
case 1:{rankname=rankname21;}
case 2:{rankname=rankname22;}
case 3:{rankname=rankname23;}
case 4:{rankname=rankname24;}
case 5:{rankname=rankname25;}
case 6:{rankname=rankname26;}
case 7:{rankname=rankname27;}
}
}
Errors
C:\Users\Freggel\Desktop\Neuer Ordner\gamemodes\Neue.pwn(1828) : error 002: only a single statement (or expression) can follow each "case"
C:\Users\Freggel\Desktop\Neuer Ordner\gamemodes\Neue.pwn(1828 -- 1829) : error 029: invalid expression, assumed zero
C:\Users\Freggel\Desktop\Neuer Ordner\gamemodes\Neue.pwn(1830) : error 014: invalid statement; not in switch
C:\Users\Freggel\Desktop\Neuer Ordner\gamemodes\Neue.pwn(1830) : warning 215: expression has no effect
C:\Users\Freggel\Desktop\Neuer Ordner\gamemodes\Neue.pwn(1830) : error 001: expected token: ";", but found ":"
C:\Users\Freggel\Desktop\Neuer Ordner\gamemodes\Neue.pwn(1830) : error 029: invalid expression, assumed zero
C:\Users\Freggel\Desktop\Neuer Ordner\gamemodes\Neue.pwn(1830) : fatal error 107: too many error messages on one line