SA-MP Forums Archive
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: too many subscripts (/showthread.php?tid=621842)



too many subscripts - Jowere - 15.11.2016

Can help me to solve this problem ... No matter how I try I can not give you head
: error 028: invalid subscript (not an array or too many subscripts): "Viptext"
PHP код:
                        if(Viptext[playerid] == 0)
            {
                
vText =CreateObject(19327, -2597.0762, -2630.4270, -5.3536, -87.699990.4001, -97.1805);
                
SetObjectMaterialText(vTexttext050"Arial"2510xFFFFFFFF01);
                
AttachObjectToVehicle(vTextvehicleid0.0, -1.90.3270.00.00.0);
                
Viptext[playerid] = 1;
            } 



Re: too many subscripts - Dayrion - 15.11.2016

028 - invalid subscript (not an array or too many subscripts): identifier
The subscript operators “[” and “]” are only valid with arrays. The number of square bracket pairs may not exceed the number of dimensions of the array.


Re: too many subscripts - Jowere - 15.11.2016

i dont know...


Re: too many subscripts - Dayrion - 15.11.2016

Show us where you defined Viptext.


Re: too many subscripts - Konstantinos - 15.11.2016

Viptext is most likely an item in enumeration that is used for a player-array so that'd make it:
pawn Код:
array_name_here[playerid][Viptext]



Re: too many subscripts - Jowere - 15.11.2016

new Viptext;


Re: too many subscripts - Konstantinos - 15.11.2016

Код:
new Viptext[MAX_PLAYERS];