sscanf problem
#1

Hello,

I've a problem with sscanf, on my dialog I've to type my number with a "." or that d'ont work

pawn Код:
Dialog:Register2(playerid, response, listitem, inputtext[])
{

    if(!response) {
        return Kick(playerid);
    }
    if(isnull(inputtext)) {
        return ShowDialog(playerid, Show:Register2, DIALOG_STYLE_INPUT, "{1564F5}Enregistrement - Вge", "Veuillez entrer l'вge de votre personnage.\n (Entre 13 et 99 ans)", "Valider", "Quitter");
    }
    new str[128];
    if(sscanf(inputtext, "i", str)) {
        PlayerInfo[playerid][pAge] = strval(inputtext);
        printf("%d", PlayerInfo[playerid][pAge]);
        return ShowDialog(playerid, Show:Register3, DIALOG_STYLE_MSGBOX, "{1564F5}Enregistrement - Sexe", "Veuillez choisir le sexe de votre personnage", "Homme", "Femme");
    }
    return ShowDialog(playerid, Show:Register2, DIALOG_STYLE_INPUT, "{1564F5}Enregistrement - Вge", "Veuillez entrer l'вge de votre personnage.\n (Entre 13 et 99 ans)", "Valider", "Quitter");
}

I've an other question, can I limit my integer between 13 and 99 with sscanf ?

Thanks
Reply


Messages In This Thread
sscanf problem - by PakPak - 06.09.2013, 14:03
Re: sscanf problem - by Misiur - 06.09.2013, 14:10
Re: sscanf problem - by PakPak - 06.09.2013, 14:26

Forum Jump:


Users browsing this thread: 1 Guest(s)