Sscanf warnings in console
#4

I fixed warning with delimiters but I can`t with string I don`t see problem in Script....

pawn Код:
stock CheckBan(playerid)
{
    format(post_string, sizeof(post_string), "action=checkip&apikey="#APIKEY"&ban_ip=%s", ips[playerid]);

    HTTP(playerid, HTTP_POST, APIPATH, post_string, "OnCheckResponse");
    return 1;
}
public OnBanResponse(index, response_code, data[])
{
    if(response_code == 200)
        if(strcmp(data, "Success?Ban added", true)) printf("[SAMP-BANS]: Error,  API responded with: %s", data);
        else SendClientMessage(index, 0xFFFFFF, "The ban was added");
    else printf("[SAMP-BANS]: Encountered an error, the page didn't respond");
}

public OnRemoveResponse(index, response_code, data[])
{
    if(response_code == 200)
    {
        if(sscanf(data, "p<?>ss", error, code)) printf("[SAMP-BANS]: Error,  API responded with: %s", data);
        else if(strcmp(error, "Success", true) == 0) SendClientMessage(index, COLOR_RED, code);
    }
    else printf("[SAMP-BANS]: Encountered an error, the page didn't respond");
}

public OnCheckResponse(index, response_code, data[])
{
    if(response_code == 200)
    {
        if(sscanf(data, "p<?>ss", error, code)) printf("[SAMP-BANS]: Error,  API responded with: %s", data);
        else if(strcmp(error, "Success", true) == 0)
        {
            SendClientMessage(index, 0xFFFFFF, code);
            Kick(index);
            printf("[SAMP-BANS]: %s", code);
        }
        else if(strcmp(code, "Ban not found")) printf("[SAMP-BANS]: Error,  API responded with: %s", code);
    }
    else printf("[SAMP-BANS]: Encountered an error, the page didn't respond");
}
Anyone can find problem I can`t find it searching but I don`t see problem
Reply


Messages In This Thread
Sscanf warnings in console - by Sanady - 24.08.2012, 10:01
Re: Sscanf warnings in console - by Vince - 24.08.2012, 10:06
Re: Sscanf warnings in console - by Misiur - 24.08.2012, 10:07
Re: Sscanf warnings in console - by Sanady - 24.08.2012, 10:20
Re: Sscanf warnings in console - by Sanady - 24.08.2012, 11:12
Re: Sscanf warnings in console - by Misiur - 24.08.2012, 11:17
Re: Sscanf warnings in console - by Sanady - 24.08.2012, 11:19
Re: Sscanf warnings in console - by Misiur - 24.08.2012, 11:24
Re: Sscanf warnings in console - by Sanady - 24.08.2012, 11:26
Re: Sscanf warnings in console - by Misiur - 24.08.2012, 11:52

Forum Jump:


Users browsing this thread: 2 Guest(s)