PDA

View Full Version : Unknown error


cngzn61
19/07/2017, 05:17 PM
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

Arbico
19/07/2017, 05:23 PM
U may have typed the gamemode name wrong in the server.cfg

cngzn61
19/07/2017, 05:26 PM
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;
}

Kane
19/07/2017, 05:28 PM
What's the error...

cngzn61
19/07/2017, 05:30 PM
What's the error...

Error: Unknown command

skuller12
19/07/2017, 05:32 PM
return -1;

return 1;

cngzn61
19/07/2017, 05:36 PM
return -1;

return 1;

It did not work

Kane
19/07/2017, 05:37 PM
http://forum.sa-mp.com/showthread.php?t=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?

cngzn61
19/07/2017, 05:45 PM
http://forum.sa-mp.com/showthread.php?t=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

Kane
19/07/2017, 05:48 PM
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.

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

cngzn61
19/07/2017, 05:52 PM
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.

I'm sorry I did not understand; Could you tell me a little more detail?

Kane
19/07/2017, 05:56 PM
https://image.prntscr.com/image/AdAhO8HTSpaxN8IhZMdN4Q.png

Make a .cfg file inside PAWNO with -d3 in it. Save it. Recompile. Restart.

cngzn61
19/07/2017, 06:01 PM
https://image.prntscr.com/image/AdAhO8HTSpaxN8IhZMdN4Q.png

Make a .cfg file inside PAWNO with -d3 in it. Save it. Recompile. Restart.

The result is the same again.