Array must be indexed error... [SOLVED]
#1

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;

Код:
	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;
}
Reply


Messages In This Thread
Array must be indexed error... [SOLVED] - by woaha - 02.12.2009, 16:39
Re: Array must be indexed error... - by ExoSanty - 02.12.2009, 17:13
Re: Array must be indexed error... - by DeathOnaStick - 02.12.2009, 17:19
Re: Array must be indexed error... - by woaha - 02.12.2009, 18:08
Re: Array must be indexed error... - by woaha - 04.12.2009, 09:46
Re: Array must be indexed error... - by woaha - 05.12.2009, 11:51
Re: Array must be indexed error... - by Donny_k - 05.12.2009, 12:31
Re: Array must be indexed error... - by woaha - 05.12.2009, 15:39
Re: Array must be indexed error... - by Donny_k - 05.12.2009, 16:35
Re: Array must be indexed error... - by woaha - 05.12.2009, 18:46

Forum Jump:


Users browsing this thread: 1 Guest(s)