SA-MP Forums Archive
Unknown 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)
+--- Thread: Unknown error (/showthread.php?tid=637686)



Unknown error - cngzn61 - 19.07.2017

Код:
stock Jammer_Info(playerid)
{
	for(new i = 0; i <= MAX_DYNAMIC_CARS; i++) if(CJData[i][cjinfo])
	{	
		new Float:x, Float:y, Float:z;
			
			x = CJData[i][cjx];
			y = CJData[i][cjy];
			z = CJData[i][cjz];
		
		new Float:x2, Float:y2, Float:z2;
		new houseid = PlayerData[playerid][pHouse];
		new bizid = PlayerData[playerid][pBusiness];
		new eid = PlayerData[playerid][pEntrance];
		
			x2 = HouseData[houseid][housePos][0];
			y2 = HouseData[houseid][housePos][1];
			z2 = HouseData[houseid][housePos][2];
			
		if(GetPlayerInterior(playerid) == 0)
		{	
			if(IsPlayerInRangeOfPoint(playerid, 60.0, x, y, z))
			{
				return SendErrorMessage(playerid, "Bu bцlgedeki sinyaller kesilmiş!");
			}
		}
		else
			{
				if(House_Inside(playerid) != -1)
				{
					if(IsPointInRangeOfPoint(x, y, z, x2, y2, z2, 60.0))
					{
						return SendErrorMessage(playerid, "Bu bцlgedeki sinyaller kesilmiş!");
					}
				}
				
				x2 = BusinessData[bizid][bizPos][0];
				y2 = BusinessData[bizid][bizPos][1];
				z2 = BusinessData[bizid][bizPos][2];

				if(Business_Inside(playerid) != -1)
			{
				if(IsPointInRangeOfPoint(x, y, z, x2, y2, z2, 60.0))
				{
					return SendErrorMessage(playerid, "Bu bцlgedeki sinyaller kesilmiş!");
				}
			}
			
				x2 = EntranceData[eid][entrancePos][0];
				y2 = EntranceData[eid][entrancePos][1];
				z2 = EntranceData[eid][entrancePos][2];
			
				if(Entrance_Inside(playerid) != -1)
			{
				if(IsPointInRangeOfPoint(x, y, z, x2, y2, z2, 60.0))
				{
					return SendErrorMessage(playerid, "Bu bцlgedeki sinyaller kesilmiş!");
				}
			}
		}
	}
	return -1;
}
Help me pls


Re: Unknown error - Arbico - 19.07.2017

U may have typed the gamemode name wrong in the server.cfg


Re: Unknown error - cngzn61 - 19.07.2017

Quote:
Originally Posted by Arbico
Посмотреть сообщение
U may have typed the gamemode name wrong in the server.cfg
Код:
CMD:testing(playerid, params[])
{
 if(Jammer_Info(playerid) == -1)
 {
   SendClientMessage(playerid, -1, "Testing..");
 }
 return 1;
}



Re: Unknown error - Kane - 19.07.2017

What's the error...


Re: Unknown error - cngzn61 - 19.07.2017

Quote:
Originally Posted by Arthur Kane
Посмотреть сообщение
What's the error...
Error: Unknown command


Re: Unknown error - skuller12 - 19.07.2017

return -1;

return 1;


Re: Unknown error - cngzn61 - 19.07.2017

Quote:
Originally Posted by skuller12
Посмотреть сообщение
return -1;

return 1;
It did not work


Re: Unknown error - Kane - 19.07.2017

https://sampforum.blast.hk/showthread.php?tid=262796

Get the CrashDetect plugin and restart your server. Type the command and check your server_log.txt for the debug. Post it back here in [PHP] code.

Also, why are you looping everything other than the vehicles in MAX_DYNAMIC_CAR?


Re: Unknown error - cngzn61 - 19.07.2017

Quote:
Originally Posted by Arthur Kane
Посмотреть сообщение
https://sampforum.blast.hk/showthread.php?tid=262796

Get the CrashDetect plugin and restart your server. Type the command and check your server_log.txt for the debug. Post it back here in [PHP] code.

Also, why are you looping everything other than the vehicles in MAX_DYNAMIC_CAR?
Код:
[19/07/2017 20:31:59] [debug] Run time error 4: "Array index out of bounds"
[19/07/2017 20:31:59] [debug]  Attempted to read/write array element at negative index -1
[19/07/2017 20:31:59] [debug] AMX backtrace:
[19/07/2017 20:31:59] [debug] #0 002606a4 in ?? (0) from qwer.amx
[19/07/2017 20:31:59] [debug] #1 00260cc0 in public cmd_ara (0, 82153744) from qwer.amx
[19/07/2017 20:31:59] [debug] #2 native CallLocalFunction () from samp-server.exe
[19/07/2017 20:31:59] [debug] #3 0002b6b8 in public OnPlayerCommandText (0, 82153724) from qwer.amx



Re: Unknown error - Kane - 19.07.2017

Forgot to mention. Make a .cfg file in pawno/. The name does not matter. Add -d3 inside and nothing else.

Re compile your script and restart it.

Quote:

Type the command and check your server_log.txt for the debug. Post it back here in [PHP] code.