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
#2

In the function SendNearbyMessage, why are there so many arguments (COLOR_PURPLE)? Is it supposed to be like that?
Reply
#3

On top of your script:
pawn Код:
new fuckensprunk[MAX_PLAYERS];
Reply
#4

Thanks Voxel
Reply
#5

Nothing against you, but after you made so many topics you should be able to define a simple variable.. Not just copy everything, you won't learn anything by doing so.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)