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



Error - Sascha - 13.08.2010

"error 006: must be assigned to an array"

Код:
new tmission[][] =
{
	1,
	2,
	3,
	4,
	5,
	6,
	7,
	8,
	9,
	10,
	11,
	12
};

dcmd_work(playerid, params[])
{
	#pragma unused params
	if(PlayerData[playerid][working] == 1){
	    SendClientMessage(playerid, GREY, "You are already working");
	    return 1;
	}
	if(PlayerData[playerid][working] == 0){
	    new rand = random(sizeof(tmission));
	    PlayerData[playerid][miss] = tmission[rand];    // ERROR LINE
	    if(PlayerData[playerid][miss] == 1){
	        SendClientMessage(playerid,CYAN, "Drive to LS Bince Clothing Store to get your cargo");
	        SendClientMessage(playerid,CYAN, "Order: Deliver Jackets to SF Construction");
	        SendClientMessage(playerid,CYAN, "Award: 10578$");
		 }
	}
	return 1;
}
what's wrong with this?


Re: Error - Jeffry - 13.08.2010

Use:

new tmission[] =