Inputtext (OnDialogResponse) returns something way off
#1

pawn Код:
case DIALOG_SET_FUELTAX: {
            if(response) {
                new stringb[80];
                Settings[0][FuelTax] = inputtext[0];
                format(stringb, sizeof(stringb), "{2F8AB1}** %s %s sat the fuel tax to $%d.", Factions[UserStats[playerid][Faction]][FRank6], GetName(playerid), 60*Settings[0][FuelTax]/2);
                SendClientMessageToAll(-1, stringb);
            }
        }
Now, when I enter "1" in the dialog the output (60*Settings[0][FuelTax]/2) becomes 1500 when it should be 30. How come?
Reply
#2

Works now ;], thanks.

pawn Код:
case DIALOG_SET_FUELTAX: {
            if(response) {
                new stringb[80];
                sscanf(inputtext, "d", Settings[0][FuelTax]);
                format(stringb, sizeof(stringb), "{2F8AB1}** %s %s sat the fuel tax to $%d.", Factions[UserStats[playerid][Faction]][FRank6], GetName(playerid), 60*Settings[0][FuelTax]/2);
                SendClientMessageToAll(-1, stringb);
            }
        }
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)