31.12.2018, 17:09
guys... what's wrong with this code? :3
I can't think again xD
PHP код:
CheckPlayerFactName(playerid)
{
new fact = pInfo[playerid][pFaction];
new none, SAPD, SAMD, SANA, SAGS;
if(fact < 1)
{
return none;
}
if(fact == 1)
{
return SAPD;
}
if(fact == 2)
{
return SAMD;
}
if(fact == 3)
{
return SANA;
}
if(fact == 4)
{
return SAGS;
}
return 0;
}
CMD:locker(playerid, params[])
{
new fname = CheckPlayerFactName(playerid);
if(!IsPLogged(playerid)) return Error(playerid, 4);
switch(fname)
{
case none: // error: UNDEFINED SYMBOL
{
SCM(playerid, COLOR_LIGHTBLUE, "SERVER: {FFFFFF}You're not joined in any faction");
}
case SAPD: // error: UNDEFINED SYMBOL
{
SCM(playerid, COLOR_LIGHTBLUE, "Faction: {FFFFFF}You've opened SAPD locker");
}
case SAMD: // error: UNDEFINED SYMBOL
{
SCM(playerid, COLOR_LIGHTBLUE, "Faction: {FFFFFF}You've opened SAMD locker");
}
case SANA: // error: UNDEFINED SYMBOL
{
SCM(playerid, COLOR_LIGHTBLUE, "Faction: {FFFFFF}You've opened SANA locker");
}
case SAGS: // error: UNDEFINED SYMBOL
{
SCM(playerid, COLOR_LIGHTBLUE, "Faction: {FFFFFF}You've opened SAGS locker");
}
}
return 1;
}