Why get errors ?
#1

PHP код:
CMD:sprunk(playeridparams[])
{
    new 
string[128];
    if(
IsPlayerCuffed(playerid) ||  IsPlayerInAnyVehicle(playerid) || IsPlayerTied(playerid))
    {
        
SendClientMessage(playeridCOLOR_GREY"You can't do this right now.");
        return 
1;
    }
    if(!
PlayerInfo[playerid][pSprunk]) return SendClientMessage(playeridCOLOR_GREY"You don't have any sprunks on you.");
    
SetPlayerSpecialAction(playeridSPECIAL_ACTION_DRINK_SPRUNK);
    
PlayerInfo[playerid][pSprunk] --;
    
format(stringsizeof(string), "* %s takes out a sprunk can and opens it up."RPN(playerid));
    
SendNearbyMessage(playerid15stringCOLOR_PURPLECOLOR_PURPLECOLOR_PURPLECOLOR_PURPLECOLOR_PURPLE);
        
fuckensprunk[playerid] = 1;
    return 
1;

Error line:
PHP код:
fuckensprunk[playerid] = 1
errors:
PHP код:
 subscript (not an array or too many subscripts): "fuckensprunk"
warning 215expression has no effect
error 001
expected token";"but found "]"
error 029invalid expressionassumed zero
fatal error 107
too many error messages on one 
line
Reply


Messages In This Thread
Why get errors ? - by barts - 08.01.2014, 14:46
Re: Why get errors ? - by offon - 08.01.2014, 14:53
Re: Why get errors ? - by Voxel - 08.01.2014, 14:53
Re: Why get errors ? - by barts - 08.01.2014, 14:57
Re: Why get errors ? - by offon - 08.01.2014, 16:40

Forum Jump:


Users browsing this thread: 1 Guest(s)