error.
#1

Error message.
Код:
error 032: array index out of bounds (variable "ContactData")

Code.
Код:
forward EndCallBecauseWait(playerid);
public EndCallBecauseWait(playerid)
{
	strdel(numberab[playerid],0,4);
	PlayerTextDrawSetString(playerid,KeyBoard2,"_");
    SendClientMessage(playerid, 0xFFFF00AA, "No answered!");
    SendClientMessage(ContactData[playerid][caller], 0xFFFF00AA, "Call cancelled!"); // <--- ERROR HERE.
	MobilePlayer[ContactData[playerid][caller]][calling] = 0;
    MobilePlayer[ContactData[playerid][caller]][caller] = -1;
	ContactData[playerid][calling] = 0;
    ContactData[playerid][caller] = -1;
	return 1;
}

Код:
enum contactData
{
	contactID,
	contactExists,
	contactName[32],
	contactNumber,
	caller
};
new ContactData[MAX_PLAYERS][MAX_CONTACTS][contactData];
Reply
#2

Beacause you have only 2 'i dont know the name in english '
ContactData[playerid][caller]
But you must have 3
new ContactData[MAX_PLAYERS][MAX_CONTACTS][contactData];
Reply
#3

Try this:
PHP код:
new ContactData[MAX_PLAYERS][contactData]; 
Why you defined MAX_CONTACTS?
Reply
#4

Quote:
Originally Posted by ATGOggy
Посмотреть сообщение
Try this:
PHP код:
new ContactData[MAX_PLAYERS][contactData]; 
Why you defined MAX_CONTACTS?
that works but its making me delete the 3 as the guy above you said.
Reply
#5

Quote:
Originally Posted by fonia5
Посмотреть сообщение
that works but its making me delete the 3 as the guy above you said.
But I can't understand, why you want three of them?
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)