Problem with GetPlayerMoney and dini_IntSet
#3

Quote:
Originally Posted by Reklez
Посмотреть сообщение
hi i'm current making my script.
the problem is i get some error at this part

pawn Код:
//This is from OnDialogResponse

/* DIALOG_BANKW */

if(GetPlayerMoney(playerid) > inputtext) return SendClientMessage(playerid, -1, "You do not have enough cash to withdraw that cash!"); //the problem is here
dini_IntSet(file, "WithDraw", inputtext); //the problem is here too!
error

Код:
error 033: array must be indexed (variable "inputtext")
error 035: argument type mismatch (argument 3)
help ASAP.

inputtext is a string and you are trying to save string with dini_setint, you must first convert string to integar with strval()... This means u r checking if int is greater than string : hope u understand .

Try this


pawn Код:
new money = strval(inputtext);//convert string to int
if(GetPlayerMoney(playerid) < money) return SendClientMessage(playerid, -1, "You do not have enough cash to withdraw that cash!");

dini_IntSet(file, "WithDraw", money);
Reply


Messages In This Thread
Problem with GetPlayerMoney and dini_IntSet - by Reklez - 11.03.2012, 05:48
Re: Problem with GetPlayerMoney and dini_IntSet - by Andi_Evandy - 11.03.2012, 06:15
Re: Problem with GetPlayerMoney and dini_IntSet - by Shabi RoxX - 11.03.2012, 06:19
Re: Problem with GetPlayerMoney and dini_IntSet - by Reklez - 11.03.2012, 06:21

Forum Jump:


Users browsing this thread: 1 Guest(s)