SA-MP Forums Archive
Array Query - 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 Query (/showthread.php?tid=102826)



Array Query - [ERP]Snow - 17.10.2009

Код:
PlayerInfo[playerid][pCreatedSatchelsX[0]]
Would that work? As i compile and get only 4 errors. I'm concluding it's the cause, correct?
If so, how would the right way go?

Код:
C:\Documents and Settings\Ryan\Desktop\Satchel.pwn(131) : warning 215: expression has no effect
C:\Documents and Settings\Ryan\Desktop\Satchel.pwn(131) : error 001: expected token: ";", but found "]"
C:\Documents and Settings\Ryan\Desktop\Satchel.pwn(131) : error 029: invalid expression, assumed zero



Re: Array Query - dice7 - 17.10.2009

The above example should work. It's something else in your code


Re: Array Query - Westie - 17.10.2009

Quote:
Originally Posted by Ryan.M
...
That won't work, unless you're not using enumerations.

I believe this will work. Don't quote me on it though.


Код:
PlayerInfo[playerid][pCreatedSatchelsX][0]



Re: Array Query - dice7 - 17.10.2009

I just tested this code and it works
pawn Код:
new array[20];
new someinfo[5];

public OnFilterScriptInit()
{
  someinfo[1] = 12;
  array[someinfo[1]] = 20;
  printf("%d",array[12]);
}
And I can guarantee that it works 100% with enumerators since I use examples like that a lot