02.12.2009, 16:39
This is solved now.
What is problem with this?
(This uses dini 1.6)
It's giving error
error 035: argument type mismatch (argument 2)
LINE: GivePlayerMoney(playerid, inputtext);
error 033: array must be indexed (variable "amount")
LINE: BankInfo = amount-inputtext;
What is problem with this?
(This uses dini 1.6)
It's giving error
error 035: argument type mismatch (argument 2)
LINE: GivePlayerMoney(playerid, inputtext);
error 033: array must be indexed (variable "amount")
LINE: BankInfo = amount-inputtext;
Код:
if(strcmp(cmdtext, "/command", true) == 0)
{
new string3[286];
format(string3,sizeof(string3),"ASAKDJIAJIFUF:");
ShowPlayerDialog(playerid,7676,DIALOG_STYLE_INPUT,"title",string3,"SENT","CALL");
return 1;
}
Код:
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
// Textfile
// Example
// Money=value
// like (money=200000)
if(dialogid == 7676)
{
if(response)
{
print("Debug.");
new BankInfo[286];
new message[286];
new amount[286];
amount = dini_Get("company_account/money.ini", "money"); // Gets "money" value and fill it to amount
GivePlayerMoney(playerid, inputtext);
BankInfo = amount-inputtext; // Operation its like this (Current bank amount, wich come from "amount" MINUS "inputtext" amount = X; answer should be now filled to BankInfo now)
format(message, sizeof(message), "You did: %sЂ", inputtext);
SendClientMessage(playerid, COLOR_WHITE, message);
dini_Set("company_account/money.ini", "money", BankInfo); // Open dini "money" and saves "money" value wich come from BankInfo
}
return 1;
}
return 0;
}


