SA-MP Forums Archive
Not an array or too many subscripts - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: Not an array or too many subscripts (/showthread.php?tid=620482)



Not an array or too many subscripts - NealPeteros - 30.10.2016

Here's my Textdraw variable
PHP код:
new Text:zSign
Here's where I create the textdraw
PHP код:
zTextdraw(playerid)
{
    
zSign[playerid] = CreatePlayerTextDraw(playerid,493.00000073.000000"~r~z");//Error Line
    
PlayerTextDrawBackgroundColor(playerid,zSign[playerid], 255);
    
PlayerTextDrawFont(playerid,zSign[playerid], 0);
    
PlayerTextDrawLetterSize(playerid,zSign[playerid], 1.2600002.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.


Re: Not an array or too many subscripts - NeXoR - 30.10.2016

Text:zSign[MAX_PLAYERS];


Re: Not an array or too many subscripts - NealPeteros - 30.10.2016

Thanks. Never knew MAX_PLAYERS could be added in variable textdraws.

EDIT: Still have tag mismatch warnings, though


Re: Not an array or too many subscripts - vassilis - 30.10.2016

PHP код:
PlayerText:zSign[MAX_PLAYERS]; 
You have created PlayerTextdraw and you need to assign it as PlayerText tag.


Re: Not an array or too many subscripts - NealPeteros - 30.10.2016

Quote:
Originally Posted by vassilis
Посмотреть сообщение
PHP код:
PlayerText:zSign[MAX_PLAYERS]; 
You have created PlayerTextdraw and you need to assign it as PlayerText tag.
That fixed it. +rep to you both