Inputtext must be indexed
#4

As you can see, inputtext[] is a string. Convert it to integer by using strval function.

Try and change this:
pawn Код:
GetsMoney[playerid] = 1; PlayerMoney[playerid] = PlayerMoney[playerid] += inputtext;
to this:
pawn Код:
GetsMoney[playerid] = 1; PlayerMoney[playerid] = PlayerMoney[playerid] += strval(inputtext);
and this:
pawn Код:
PlayerInfo[playerid][pAccount]=PlayerInfo[playerid][pAccount]-inputtext;
to this:
pawn Код:
PlayerInfo[playerid][pAccount]=PlayerInfo[playerid][pAccount]-strval(inputtext);
and this:
pawn Код:
format(string, sizeof(string), " You Have Withdrawn $%d from your account Total: $%d ", inputtext,PlayerInfo[playerid][pAccount]);
to this:
pawn Код:
format(string, sizeof(string), " You Have Withdrawn $%d from your account Total: $%d ", strval(inputtext),PlayerInfo[playerid][pAccount]);
and this:
pawn Код:
format(string, sizeof(string), "Player %s took $%d from his account . Date:(%d-%d-%d)(%d:%d Uhr)", sendername,inputtext ,month,day,year,hour,minute);
to this:
pawn Код:
format(string, sizeof(string), "Player %s took $%d from his account . Date:(%d-%d-%d)(%d:%d Uhr)", sendername,strval(inputtext) ,month,day,year,hour,minute);
And use strlen to check the length of the string, not strval.
Reply


Messages In This Thread
Inputtext must be indexed - by Justsmile - 10.10.2009, 08:53
Re: Inputtext must be indexed - by Sergei - 10.10.2009, 09:03
Re: Inputtext must be indexed - by Justsmile - 10.10.2009, 09:06
Re: Inputtext must be indexed - by Correlli - 10.10.2009, 09:07
Re: Inputtext must be indexed - by Justsmile - 10.10.2009, 09:09
Re: Inputtext must be indexed - by Sergei - 10.10.2009, 09:12
Re: Inputtext must be indexed - by Correlli - 10.10.2009, 09:13
Re: Inputtext must be indexed - by Justsmile - 10.10.2009, 09:15
Re: Inputtext must be indexed - by erorcun - 10.10.2009, 09:16
Re: Inputtext must be indexed - by Justsmile - 10.10.2009, 09:21

Forum Jump:


Users browsing this thread: 1 Guest(s)