Problem with strcmp
#1

Hello,

this is probably something I just overlooked.

pawn Код:
COMMAND:takejob(playerid, params[])
{
    if(player[playerid][ajob] != 0) return SendClientMessage(playerid, COLOR_WHITE, "ERROR » You already have a job, use /quitjob first");
    new job, accept[64], jobstring[128];
    sscanf(params, "s[63]", accept);
    printf("Parameters: %s", accept);
    if(IsPlayerInRangeOfPoint(playerid, 10.0, 2512.4465,-1473.9086,24.8523)) // Mechanic NPC
    {
        if(strcmp(accept, "accept", true) == 0)
        {
            job = 1;
            player[playerid][ajob] = job;
            SavePlayerData(playerid, "ajob", player[playerid][ajob], 2);
            format(jobstring, sizeof(jobstring), "NOTE » You are now a %s type /help for more information and perks.", ReturnJobName(job));
            SendClientMessage(playerid, COLOR_YELLOW, jobstring);
            printf("Woops, something went wrong!");
            return 1;
        }
        else
        {
            printf("Is it actually working?!");
            SendClientMessage(playerid, COLOR_WHITE, "Are you sure you want the job? Type /takejob confirm");
        }
    }
    return 1;
}
Returns the strcmp part no mather what.
Reply


Messages In This Thread
Problem with strcmp - by hanzen - 04.01.2011, 17:31
Re: Problem with strcmp - by Kwarde - 04.01.2011, 17:37
Re: Problem with strcmp - by hanzen - 04.01.2011, 17:49
Re: Problem with strcmp - by Kwarde - 04.01.2011, 17:52
Re: Problem with strcmp - by hanzen - 04.01.2011, 17:54
Re: Problem with strcmp - by Kwarde - 04.01.2011, 18:00
Re: Problem with strcmp - by hanzen - 04.01.2011, 18:03
Re: Problem with strcmp - by Kwarde - 04.01.2011, 18:06

Forum Jump:


Users browsing this thread: 1 Guest(s)