error 033: array must be indexed (variable "s")
#1

Quote:

public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
new updates = GetPVarInt(playerid, "UID");
if(dialogid == DIALOG_UPDATE)
{
if(response)
{
if(isnull(inputtext)) return ShowPlayerDialog(playerid, DIALOG_UPDATE, DIALOG_STYLE_INPUT, "adding update", "please write your update below", "Add", "Cancel");
for(new x=1 ; x<560 ; x++)
{
new s[256];
format(s, sizeof(s), "update%d", x);
if(!dini_Isset("updates.ini", s))
{
new year, month, day;
getdate(year, month, day);
new utext[1024];
format(utext, sizeof(utext), "%d/%d/%d", day, month, year);
format(s, sizeof(s), "date%d", x);
dini_Set("updates.ini", s, utext);
format(utext, sizeof(utext), "%s", inputtext);
format(s, sizeof(s), "update%d", x);
dini_Set("updates.ini", s, utext);
new dd = dini_Int("updates.ini", "MAX");
dini_IntSet("updates.ini", "MAX", dd+1);
format(s, sizeof(s), "Added update id %d. Your Update: '%s', and Date: %d/%d/%d.", x, inputtext, day, month, year);
SendClientMessage(playerid, COLOR_YELLOW, s);
break;
}
}
return 1;
}
return 1;

error is in this line :
Quote:

if(!dini_Isset("updates.ini", s))

Reply


Messages In This Thread
error 033: array must be indexed (variable "s") - by p3p4 - 14.02.2019, 18:01
Re: error 033: array must be indexed (variable "s") - by TokicMajstor - 14.02.2019, 18:27
Re: error 033: array must be indexed (variable "s") - by IllidanS4 - 15.02.2019, 10:19

Forum Jump:


Users browsing this thread: 2 Guest(s)