SA-MP Forums Archive
D:\server\gamemodes\ExtremeGame.pwn(6504) : error 017: undefined symbol "JobWorking" - 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)
+--- Thread: D:\server\gamemodes\ExtremeGame.pwn(6504) : error 017: undefined symbol "JobWorking" (/showthread.php?tid=653919)



D:\server\gamemodes\ExtremeGame.pwn(6504) : error 017: undefined symbol "JobWorking" - enzulikeS - 16.05.2018

Код:
CMD:work(playerid, params[])
{
	new Float: Pos[3], Float: CarAngle, string[256];
	if(PlayerInfo[playerid][pJob] == 0) return SendClientMessage(playerid, COLOR_GREY, "Nu ai un job!");
	if(JobWorking[playerid] == 1) return SendClientMessage(playerid, COLOR_WHITE, "Muncesti deja.");
	switch(PlayerInfo[playerid][pJob]) {
		case 5:{
			if(PlayerToPoint(7.0, playerid, 2113.9392,-1775.1980,13.3918)) {
				if(PlayerInfo[playerid][pCarLic] == 0) return SCM(playerid, COLOR_LGREEN, "Eroare: Ai nevoie de o licenta de condus pentru a putea munci la acest job!");
                CarAngle = 0;
                CP[playerid] = 155;
				new j = random(housess)+1;
				if(j == 0) j = 1;
				SetPlayerCheckpointEx(playerid, HouseInfo[j][hEntrancex],HouseInfo[j][hEntrancey],HouseInfo[j][hEntrancez], 7.0);
				format(string, sizeof(string), "Du-te la punctul ~r~~h~rosu~w~~h~ de pe mapa pentru a livra pizza.~n~Distanta: ~y~%0.1fm.", GetPlayerDistanceFromPoint(playerid, HouseInfo[j][hEntrancex],HouseInfo[j][hEntrancey],HouseInfo[j][hEntrancez]));
				PlayerTextDrawSetString(playerid, InfosTD, string);
				SetTimerEx("HideTextdraw", 8000, 0, "%d", playerid);
				PlayerTextDrawShow(playerid, InfosTD);				
			}
	        else {
 				if(CP[playerid] != 0) return ShowPlayerDialog(playerid, DIALOG_CHECKPOINT, DIALOG_STYLE_MSGBOX, "Checkpoint", "Ai deja un checkpoint activ.\nDoresti sa-l anulezi? Daca da, apasa pe 'Ok'.", "Ok", "Exit");
	          	CP[playerid] = 53;
				SendClientMessage(playerid, COLOR_GREY, "Nu esti la locul unde poti incepe munca. Ti-am pus un checkpoint, du-te la el!");
				SetPlayerCheckpointEx(playerid,2113.9392,-1775.1980,13.3918, 7.0);
				return 1;
		    }
	    }	
	}
	return 1;
}
JobWorking is just a variable and I defined it,

Код:
SellHiddenID[playerid] = -1;			SellHiddenPrice[playerid] = 0;
	BlockVehUse[playerid] = 0;				FireworkTimer[playerid] = 0;
	TogVIP[playerid] = 1;					TaxiDriver[playerid] = -1;				
	AdminDuty[playerid] = 0;				JobWorking[playerid] = 0;
	HealTimer[playerid] = 0;				TogBid[playerid] = 1;
	BreachID[playerid] = 0;					login[playerid] = 0;
	toge[playerid] = 0;						togarrests[playerid] = 0;



Re: D:\server\gamemodes\ExtremeGame.pwn(6504) : error 017: undefined symbol "JobWorking" - Bruno13 - 16.05.2018

Are you sure you have defined?

PHP код:
new JobWorking[MAX_PLAYERS]; 



Re: D:\server\gamemodes\ExtremeGame.pwn(6504) : error 017: undefined symbol "JobWorking" - enzulikeS - 16.05.2018

fixed, ty