SA-MP Forums Archive
Asking About sscanf in OnDialogResponse - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: Asking About sscanf in OnDialogResponse (/showthread.php?tid=519287)



Asking About sscanf in OnDialogResponse - xFirex - 13.06.2014

pawn Код:
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
        if(dialogid == FISH_DIALOG+1)
        {
           new text;
           if(sscanf(inputtext, "d", text)) return SendClientMessage(playerid, -1, "ERROR: please enter numeric number");
           {
              new warafak;
              text = warafak;
              text *= BaitCost;
              if(GetPlayerMoney(playerid) < text) return SendClientMessage(playerid,-1,"ERROR: You Don't Have Money To Purchase The Bait");
              {
                 PlayerInfo[playerid][pBaits] += warafak;
              }
           }
           return 1;
}
there is no error here.. but after i go to fish shop and type the amount of bait i want, its nothing happened


Re: Asking About sscanf in OnDialogResponse - xFirex - 13.06.2014

up ??


Re: Asking About sscanf in OnDialogResponse - RajatPawar - 13.06.2014

What are we supposed to do?


Re : Asking About sscanf in OnDialogResponse - S4t3K - 13.06.2014

This line

pawn Код:
text = warafak;
is completely useless because you are just doing "text = 0;" (warafak is just initialized and its value is 0)