array must be indexed? - 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 must be indexed? (
/showthread.php?tid=164845)
array must be indexed? -
Ash. - 02.08.2010
Hi SAMP Forum.
Before you all say "WIKI", or "This is PAWN basics", can i just point out that i have had no sleep, and started this at 2am GMT Time. I dont know why either, i was bored lol.
Well anway, Im having a few problems with a global array. Here are the errors:
pawn Код:
C:\Users\Ashley Hardy\SA-MP Stuff!\filterscripts\newwork.pwn(59) : error 033: array must be indexed (variable "gPlayerMission")
C:\Users\Ashley Hardy\SA-MP Stuff!\filterscripts\newwork.pwn(61) : error 033: array must be indexed (variable "gPlayerMission")
C:\Users\Ashley Hardy\SA-MP Stuff!\filterscripts\newwork.pwn(68) : error 033: array must be indexed (variable "gPlayerMission")
C:\Users\Ashley Hardy\SA-MP Stuff!\filterscripts\newwork.pwn(71) : error 033: array must be indexed (variable "gPlayerMission")
C:\Users\Ashley Hardy\SA-MP Stuff!\filterscripts\newwork.pwn(81) : error 033: array must be indexed (variable "gPlayerMission")
C:\Users\Ashley Hardy\SA-MP Stuff!\filterscripts\newwork.pwn(85) : error 033: array must be indexed (variable "gPlayerMission")
C:\Users\Ashley Hardy\SA-MP Stuff!\filterscripts\newwork.pwn(87) : error 033: array must be indexed (variable "gPlayerMission")
C:\Users\Ashley Hardy\SA-MP Stuff!\filterscripts\newwork.pwn(98) : error 033: array must be indexed (variable "gPlayerMission")
C:\Users\Ashley Hardy\SA-MP Stuff!\filterscripts\newwork.pwn(101) : error 033: array must be indexed (variable "gPlayerMission")
C:\Users\Ashley Hardy\SA-MP Stuff!\filterscripts\newwork.pwn(103) : error 033: array must be indexed (variable "gPlayerMission")
C:\Users\Ashley Hardy\SA-MP Stuff!\filterscripts\newwork.pwn(112) : error 033: array must be indexed (variable "gPlayerMission")
C:\Users\Ashley Hardy\SA-MP Stuff!\filterscripts\newwork.pwn(113) : error 033: array must be indexed (variable "gPlayerMission")
Pawn compiler 3.2.3664 Copyright (c) 1997-2006, ITB CompuPhase
12 Errors.
However my "gPlayerMission" is here:
My code is to pick a line from an array, save that line into gPlayerMission, and then call gPlayerMission in a place where i need something from the array, like this:
pawn Код:
MissionArray[gPlayerMission][lx]
Can somebody help me? And after this i might get some sleep
- Also while im here, can anybody think of anything i could do for SA-MP's forum (filterscript prefferably)
Thanks
Ash
EDIT: Fixed, i forget to add the [playerid] index - silly how little things are the biggest problems
Thanks Anyway guys and girls
Re: array must be indexed? -
Retardedwolf - 02.08.2010
An array as a whole cannot be used in a expression; you must
indicate an element of the array between square brackets.