SA-MP Forums Archive
I have problem in scripting - 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: I have problem in scripting (/showthread.php?tid=609487)



I have problem in scripting - roncohen7 - 13.06.2016

I have this problem, I don't know what to do please help.

Код:
\gamemodes\/../gamemodes/includes/IGRPGM.pwn(5517) : error 017: undefined symbol "SavePlant"
/../gamemodes/includes/IGRPGM.pwn(6382) : error 017: undefined symbol "ClearCrimes"
/../gamemodes/includes/IGRPGM.pwn(7581) : error 017: undefined symbol "LoadHGBackpacks"
/../gamemodes/includes/IGRPGM.pwn(7843) : error 017: undefined symbol "AddFlag"
/../gamemodes/includes/IGRPGM.pwn(7865) : error 017: undefined symbol "AddNationQueue"
/../gamemodes/includes/IGRPGM.pwn(7883) : error 017: undefined symbol "AddNationQueue"
/../gamemodes/includes/IGRPGM.pwn(7966) : error 017: undefined symbol "SystemBan"
/../gamemodes/includes/IGRPGM.pwn(7967) : error 017: undefined symbol "MySQLBan"
/../gamemodes/includes/IGRPGM.pwn(8008) : error 017: undefined symbol "SystemBan"
/../gamemodes/includes/IGRPGM.pwn(8009) : error 017: undefined symbol "MySQLBan"
/../gamemodes/includes/IGRPGM.pwn(8034) : error 017: undefined symbol "SystemBan"
/../gamemodes/includes/IGRPGM.pwn(8035) : error 017: undefined symbol "MySQLBan"
/../gamemodes/includes/IGRPGM.pwn(8063) : error 017: undefined symbol "SystemBan"
/../gamemodes/includes/IGRPGM.pwn(8064) : error 017: undefined symbol "MySQLBan"
/../gamemodes/includes/IGRPGM.pwn(8093) : error 017: undefined symbol "SystemBan"
/../gamemodes/includes/IGRPGM.pwn(8094) : error 017: undefined symbol "MySQLBan"
/../gamemodes/includes/IGRPGM.pwn(8123) : error 017: undefined symbol "SystemBan"
/../gamemodes/includes/IGRPGM.pwn(8124) : error 017: undefined symbol "MySQLBan"
/../gamemodes/includes/IGRPGM.pwn(8150) : error 017: undefined symbol "SystemBan"
/../gamemodes/includes/IGRPGM.pwn(8151) : error 017: undefined symbol "MySQLBan"
/../gamemodes/includes/IGRPGM.pwn(8176) : error 017: undefined symbol "SystemBan"
/../gamemodes/includes/IGRPGM.pwn(8177) : error 017: undefined symbol "MySQLBan"
/../gamemodes/includes/IGRPGM.pwn(8202) : error 017: undefined symbol "SystemBan"
/../gamemodes/includes/IGRPGM.pwn(8203) : error 017: undefined symbol "MySQLBan"
/../gamemodes/includes/IGRPGM.pwn(8228) : error 017: undefined symbol "SystemBan"
/../gamemodes/includes/IGRPGM.pwn(8229) : error 017: undefined symbol "MySQLBan"

Compilation aborted.Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


26 Errors.
Anyone can help me with this?


Re: I have problem in scripting - Dayrion - 13.06.2016

You have to define these "symbol".
PHP код:
 new MySQLBanSystemBan



Re: I have problem in scripting - roncohen7 - 13.06.2016

Quote:
Originally Posted by Dayrion
Посмотреть сообщение
You have to define these "symbol".
PHP код:
 new MySQLBanSystemBan
I have it already.


Re: I have problem in scripting - Dayrion - 13.06.2016

Show us the line where you define it (with the line numbers) and the function where you get errors.


Re: I have problem in scripting - roncohen7 - 13.06.2016

Quote:
Originally Posted by Dayrion
Посмотреть сообщение
Show us the line where you define it (with the line numbers) and the function where you get errors.
Well, I don't think there is a problem in functions
everything is defined stock .. ... ...
It will take me alot of time to copy-paste all lines


Re: I have problem in scripting - Sew_Sumi - 13.06.2016

"stock"...


Dude, you probably have the variable defined outside of the functions reach.

Post up where you have them defined, in the gamemode (I notice you are using the includes folder for your GM).


Re: I have problem in scripting - roncohen7 - 13.06.2016

Quote:
Originally Posted by Sew_Sumi
Посмотреть сообщение
"stock"...


Dude, you probably have the variable defined outside of the functions reach.

Post up where you have them defined, in the gamemode (I notice you are using the includes folder for your GM).
I will post you the lines where are the errors?


Re: I have problem in scripting - roncohen7 - 13.06.2016

Quote:
Originally Posted by Sew_Sumi
Посмотреть сообщение
"stock"...


Dude, you probably have the variable defined outside of the functions reach.

Post up where you have them defined, in the gamemode (I notice you are using the includes folder for your GM).
Код:
task SyncUp[60000]()
{
	static
		string[215];

	SyncTime();
	SyncMinTime();

	for(new i = 0; i < MAX_PLANTS; i++)
	{
    	if(IsValidDynamicObject(Plants[i][pObjectSpawned]))
		{
    	    if(Plants[i][pExpires] > gettime())
			{
				switch(Plants[i][pPlantType])
				{
				    case 1:
				    {
				        if(Plants[i][pGrowth] < 45)
						{
       						switch(Plants[i][pDrugsSkill])
							{
								case 0 .. 50: Plants[i][pGrowth] += 1;
								case 51 .. 100: Plants[i][pGrowth] += 2;
								case 101 .. 200: Plants[i][pGrowth] += 3;
								case 201 .. 400: Plants[i][pGrowth] += 4;
								default: Plants[i][pGrowth] += 5;
							}
						}
				    }
				    case 2:
				    {
				        if(Plants[i][pGrowth] < 120) Plants[i][pGrowth] += 1;
						if(Plants[i][pGrowth] == 120)
						{
						    DestroyDynamicObject(Plants[i][pObjectSpawned]);
						    Plants[i][pObjectSpawned] = CreateDynamicObject(862, Plants[i][pPos][0], Plants[i][pPos][1], Plants[i][pPos][2], 0.0, 0.0, 0.0, Plants[i][pVirtual], Plants[i][pInterior]);
							Plants[i][pGrowth] = 121;
							Plants[i][pObject] = 862;
							format(string, sizeof(string), "Opium plant (%d) is ready to be picked.", i);
							Log("logs/plant.log", string);
						}
					}
				}
			}
			else if(Plants[i][pExpires] == 0) { }
			else
			{
			    format(string, sizeof(string), "Plant (%d) has expired.", i);
				Log("logs/plant.log", string);
			    DestroyPlant(i);
	[ERROR] -->   SavePlant(i);
			}
		}
	}
Код:
task ServerHeartbeat[1000]() {
    if(++AdminWarning == 15) {
		for(new z = 0; z < MAX_REPORTS; z++)
		{
			if(Reports[z][BeingUsed] == 1)
			{
				if(Reports[z][ReportPriority] == 1 || Reports[z][ReportPriority] == 2)
				{
					ABroadCast(COLOR_LIGHTRED,"A priority report is pending.", 2, true);
					break;
				}
			}
		}
		AdminWarning = 0;
	}
    static string[128];
	foreach(new i: Player)
	{
		if(playerTabbed[i] == 0) {
			switch(PlayerInfo[i][pLevel]) {
				case 0 .. 2: PlayerInfo[i][pPayCheck] += 1;
				case 3 .. 4: PlayerInfo[i][pPayCheck] += 2;
				case 5 .. 6: PlayerInfo[i][pPayCheck] += 3;
				case 7 .. 8: PlayerInfo[i][pPayCheck] += 4;
				case 9 .. 10: PlayerInfo[i][pPayCheck] += 5;
				case 11 .. 12: PlayerInfo[i][pPayCheck] += 6;
				case 13 .. 14: PlayerInfo[i][pPayCheck] += 7;
				case 15 .. 16: PlayerInfo[i][pPayCheck] += 8;
				case 17 .. 18: PlayerInfo[i][pPayCheck] += 9;
				case 19 .. 20: PlayerInfo[i][pPayCheck] += 10;
				default: PlayerInfo[i][pPayCheck] += 11;
			}
			if(++PlayerInfo[i][pConnectSeconds] >= 3600) {
				PayDay(i);
			}
		}

		if (GetPVarInt(i, "MailTime") > 0)
			SetPVarInt(i, "MailTime", GetPVarInt(i, "MailTime") - 1);
		else
			DeletePVar(i, "MailTime");

		if(PlayerInfo[i][pJudgeJailType] != 0 && PlayerInfo[i][pJudgeJailTime] > 0 && !PlayerInfo[i][pBeingSentenced]) PlayerInfo[i][pJudgeJailTime]--;
		if(PlayerInfo[i][pJudgeJailTime] <= 0 && PlayerInfo[i][pJudgeJailType] != 0) PlayerInfo[i][pJudgeJailType] = 0;
		if(playerTabbed[i] == 0) {
			if(PlayerInfo[i][pJailTime] > 0 && --PlayerInfo[i][pJailTime] <= 0) {
				if(strfind(PlayerInfo[i][pPrisonReason], "[IC]", true) != -1 || strfind(PlayerInfo[i][pPrisonReason], "[ISOLATE]", true) != -1) {
	   				SetPlayerInterior(i, 0);
					PlayerInfo[i][pInt] = 0;
					SetPlayerVirtualWorld(i, 0);
					PlayerInfo[i][pVW] = 0;
					SetPlayerPos(i, -2028.5829,-96.5533,35.1641);
				}
				else {
				 	SetPlayerInterior(i, 0);
					PlayerInfo[i][pInt] = 0;
					SetPlayerVirtualWorld(i, 0);
					PlayerInfo[i][pVW] = 0;
	    			SetPlayerPos(i, 1544.5059,-1675.5673,13.5585);
				}
				SetPlayerHealth(i, 100);
				PlayerInfo[i][pJailTime] = 0;
				PhoneOnline[i] = 0;
				SendClientMessageEx(i, COLOR_GRAD1,"   You have paid your debt to society.");
				GameTextForPlayer(i, "~g~Freedom~n~~w~Try to be a better citizen", 5000, 1);
	[ERROR] -->       ClearCrimes(i);
Код:
task hungerGames[1000]()
{
	new string[128];
	if(hgActive)
	{
		if(hgCountdown > 0)
		{
			hgCountdown--;

			format(string, sizeof(string), "Time left until start: %d", hgCountdown);
			for(new i = 0; i < MAX_PLAYERS; i++)
			{
				if(HungerPlayerInfo[i][hgInEvent] == 1)
				{
					PlayerTextDrawSetString(i, HungerPlayerInfo[i][hgTimeLeftText], string);
				}
			}

			if(hgCountdown == 300)
			{
				SendClientMessageToAll(COLOR_LIGHTBLUE, "The Hunger Games Event will start in 5 minutes, type /joinhunger to participate.");
			}
			else if(hgCountdown == 60)
			{
				SendClientMessageToAll(COLOR_LIGHTBLUE, "The Hunger Games Event will start in 1 minute, type /joinhunger to participate.");
			}
			else if(hgCountdown == 30)
			{
				for(new i = 0; i < MAX_PLAYERS; i++)
				{
					if(HungerPlayerInfo[i][hgInEvent] == 1)
					{
						SendClientMessageEx(i, COLOR_LIGHTBLUE, "* The event will be starting in 30 seconds...");
						SendClientMessageEx(i, COLOR_LIGHTBLUE, "* Godmode will be disabled and backpacks will be spawned in 30 seconds.");
					}
				}
			}
		}
		else if(hgCountdown == 0 && hgActive == 1)
		{
	ERROR --> LoadHGBackpacks();



Re: I have problem in scripting - Nin9r - 13.06.2016

Maybe you forgot a { somewhere.


Re: I have problem in scripting - Sew_Sumi - 13.06.2016

You even highlighted an error yourself...

Код:
DestroyPlant(i);
	[ERROR] -->   SavePlant(i);
Would that not get an erroneous result if you've just destroyed it?