SA-MP Forums Archive
error 006: must be assigned to an array - 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: error 006: must be assigned to an array (/showthread.php?tid=72696)



error 006: must be assigned to an array - Manuel4 - 10.04.2009

Hey, I've searched for it, and I saw a script error almost the same as mine, but it didn't work.

new aranks[5];
aranks[0] = "Temporary administrator";
aranks[1] = "Administrator";
aranks[2] = "Administrator manager";
aranks[3] = "Lead administrator";
aranks[4] = "Server owner";

This gives me the error: error 006: must be assigned to an array.

Why's this? Thanks in advance.


Re: error 006: must be assigned to an array - Goldkiller - 10.04.2009

You need a multidimensional array (Not sure whether it's called like that)

Код:
new
  aranks[5][32]= {
  //aranks[5][]= { Works too
	"Temporary administrator",
	"Administrator",
	"Administrator manager",
	"Lead administrator",
	"Server owner"
	};