Undefined symbol
#1

Код:
C:\Users\Namn\Desktop\-NLG-\gamemodes\zcmd_test.pwn(5219) : error 001: expected token: ";", but found "-identifier-"
C:\Users\Namn\Desktop\-NLG-\gamemodes\zcmd_test.pwn(5219) : error 017: undefined symbol "string"
C:\Users\Namn\Desktop\-NLG-\gamemodes\zcmd_test.pwn(5219) : warning 215: expression has no effect
C:\Users\Namn\Desktop\-NLG-\gamemodes\zcmd_test.pwn(5219) : error 001: expected token: ";", but found "]"
C:\Users\Namn\Desktop\-NLG-\gamemodes\zcmd_test.pwn(5219) : fatal error 107: too many error messages on one line
pawn Код:
CMD:breathtest(playerid, params[])
{
    if(IsACop(playerid))
    {
        new play,playname[MAX_PLAYER_NAME],pname[MAX_PLAYER_NAME], level string[128];
      /*----->*/  if(sscanf(params,"u",play)) return SCM(playerid, COLOR_WHITE, "USAGE: /breathtest [playerid/PartOfName]");// Error line
        GetPlayerName(play, sizeof(playname));
        if(play != INVALID_PLAYER_ID)
        {
            if(GetDistanceBetweenPlayers(playerid, play) < 3)
            {
                level = GetPlayerDrunkLevel(play);
                format(string, sizeof(string)),"Law Enforcer grabs his breathalyzer and puts it in %s's mouth",playname);
                Prox(30.0, playerid, string, COLOR_RLRPGBLUE);
                format(string, sizeof(string)),"%s's drunk level is %d",playname, level);
                SCM(playerid, COLOR_LIGHTBLUE, string);
                return 1;
            }
            else return SCM(playerid, COLOR_GREY, "Not close enough to the other player!");
        }
        else return SCM(playerid, COLOR_GREY, "Player is not connected");
    }
    else return SCM(playerid, COLOR_GREY, "You are not a Law member!");
    return 1;
}
Please forgive me if it's just some stupid misstake I made.. im really tired and cant tihnk straight
Reply
#2

pawn Код:
new play,playname[MAX_PLAYER_NAME],pname[MAX_PLAYER_NAME], level, string[128];
EDIT:
pawn Код:
if(sscanf(params,"u",play)) return SCM(playerid, COLOR_WHITE, "USAGE: /breathtest [playerid/PartOfName]");
GetPlayerName(play, playname,sizeof(playname));
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)