SA-MP Forums Archive
Array Problem - Error 006 - 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)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: Array Problem - Error 006 (/showthread.php?tid=195839)



Array Problem - Error 006 - Jacob_Venturas - 03.12.2010

PlayerInfo[Player][pDivision] = inputtext;

Why isn't this working (keep in mind Player is defined)?


AW: Array Problem - Error 006 - Meta - 03.12.2010

how did you create the Array with the variables?


Re: Array Problem - Error 006 - Jacob_Venturas - 03.12.2010

What?....


Re: Array Problem - Error 006 - Axuj - 03.12.2010

You cannot create Array in variable like PlayerInfo.


Re: Array Problem - Error 006 - Jacob_Venturas - 03.12.2010

So how do I do this then? Don't I use strvl or something?
I fixed it.
strval(inputtext);


Re: Array Problem - Error 006 - JaTochNietDan - 03.12.2010

When creating the variable using enum, then you need to specify it as an array.

So in the enum where you specify pDivision, add it as something like this, depending on the maximum length of that string you're storing in it.

pawn Код:
pDivision[100],