error 033: array must be indexed (variable "inputtext")
#7

pawn Code:
new Float:value = strval(inputtext) * 0.4;
    GivePlayerMoney(playerid, floatround(value, floatround_round));
References:
https://sampwiki.blast.hk/wiki/Floatround
https://sampwiki.blast.hk/wiki/Floats

EDIT:

I would also recommend that you set a limit on what a player can enter. To make sure they don't enter negative or very high positive values such as -194581371489144 and 19478189587175 for instance.
Example:
pawn Code:
if(!(1 <= strval(inputtext) <= 999999999)) return SendClientMessage(playerid, -1, "You must put a value between 1 and 999999999.");
Reply


Messages In This Thread

Forum Jump:


Users browsing this thread: 2 Guest(s)