PDA

View Full Version : Not an array or too many subscripts


NealPeteros
30/10/2016, 03:57 PM
Here's my Textdraw variable
new Text:zSign;

Here's where I create the textdraw
zTextdraw(playerid)
{
zSign[playerid] = CreatePlayerTextDraw(playerid,493.000000, 73.000000, "~r~z");//Error Line
PlayerTextDrawBackgroundColor(playerid,zSign[playerid], 255);
PlayerTextDrawFont(playerid,zSign[playerid], 0);
PlayerTextDrawLetterSize(playerid,zSign[playerid], 1.260000, 2.499999);
PlayerTextDrawColor(playerid,zSign[playerid], -1);
PlayerTextDrawSetOutline(playerid,zSign[playerid], 1);
PlayerTextDrawSetProportional(playerid,zSign[playerid], 1);
PlayerTextDrawSetSelectable(playerid,zSign[playerid], 0);
}

zTextdraw is called on OnPlayerConnect.

NeXoR
30/10/2016, 04:07 PM
Text:zSign[MAX_PLAYERS];

NealPeteros
30/10/2016, 04:11 PM
Thanks. Never knew MAX_PLAYERS could be added in variable textdraws.

EDIT: Still have tag mismatch warnings, though

vassilis
30/10/2016, 04:16 PM
PlayerText:zSign[MAX_PLAYERS];
You have created PlayerTextdraw and you need to assign it as PlayerText tag.

NealPeteros
30/10/2016, 04:19 PM
PlayerText:zSign[MAX_PLAYERS];
You have created PlayerTextdraw and you need to assign it as PlayerText tag.

That fixed it. +rep to you both