SA-MP Forums Archive
Converting job names from one include to another - 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: Converting job names from one include to another (/showthread.php?tid=571141)



Converting job names from one include to another - maxmax1 - 16.04.2015

Hello. I have problem. I make GM where every system have own includes. I have /stats cmd in users.inc and i want show job names in stats but job names i have in job.inc and it gives error not undefine NamesJobs but its defined in jobs.inc and works there. When i change #include Users and #include Jobs order in main.pwn then gives error undefined pInfo from playerdata. Do i must copy-paste job names variable and every time i create new job add job name both to users.inc and jobs.inc or is there another way to read jobnames from job.inc with out make double variables? i hope u understand my bad english.
Added: 17.04.2015
This is in Jobs.inc
Код:
new NamesJobs[ MAX_JOBS ][ 30 ] = //Define jobs name
{
	{"Tццtu"},
	{"Pizzapoiss"},
	{"Taxi Driver"}
};
and this is stats in user.inc Thisis working in jobs.inc but not in users.inc
Код:
 NamesJobs[wJob[playerid]]
Getting this error: error 017: undefined symbol "NamesJobs".


Re: Converting job names from one include to another - maxmax1 - 17.04.2015

bump


Re: Converting job names from one include to another - Ahmad45123 - 17.04.2015

You must have a main script which has all that files included there.
So, Goto that file and make sure the jobs.inc is included before the users.inc

And if you have variables that are in users.inc that are used in jobs.inc than you will have to move the variable to the main script as it's going to be used globally.


Re: Converting job names from one include to another - maxmax1 - 17.04.2015

that means there aren't another option??


Re: Converting job names from one include to another - fuckingcruse - 17.04.2015

Maxmax1 just to avoid you to get warnings , read the rules , you cannot double post , if you want you can edit your old post , I say this because you posted your topic and you posted too..


Re: Converting job names from one include to another - Ahmad45123 - 17.04.2015

No I don't think there is any other option.

And please don't bump your posts as fuckingcruse said.


Re: Converting job names from one include to another - maxmax1 - 17.04.2015

Ok Thanks.