AMX backtrace
#1

hello u can help me
Код:
----------
Loaded log file: "server_log.txt".
----------

SA-MP Dedicated Server
----------------------
v0.3.7-R2, ©2005-2015 SA-MP Team

[20:43:19] 
[20:43:19] Server Plugins
[20:43:19] --------------
[20:43:19]  Loading plugin: streamer
[20:43:19] 

*** Streamer Plugin v2.7.2 by Incognito loaded ***

[20:43:19]   Loaded.
[20:43:19]  Loading plugin: sscanf
[20:43:19] 

[20:43:19]  ===============================

[20:43:19]       sscanf plugin loaded.     

[20:43:19]          Version:  2.8.1        

[20:43:19]    © 2012 Alex "******" Cole  

[20:43:19]  ===============================

[20:43:19]   Loaded.
[20:43:19]  Loading plugin: audio
[20:43:19] 

*** Audio Plugin v0.5 R2 by Incognito loaded ***

[20:43:19]   Loaded.
[20:43:19]  Loading plugin: nativechecker
[20:43:19]   Loaded.
[20:43:19]  Loading plugin: crashdetect
[20:43:19]   CrashDetect v4.12 is OK.
[20:43:19]   Loaded.
[20:43:19]  Loaded 5 plugins.

[20:43:19] 
[20:43:19] Filterscripts
[20:43:19] ---------------
[20:43:19]   Loading filterscript 'MAPCityHall.amx'...
[20:43:20]   Loading filterscript 'Buttons.amx'...
[20:43:21]   Loaded 2 filterscripts.

[20:43:21]  
[20:43:21]  ======================================= 
[20:43:21]  |                                     | 
[20:43:21]  |        YSI version 1.03.0011        | 
[20:43:21]  |        By Alex "******" Cole        | 
[20:43:21]  |                                     | 
[20:43:21]  |  Checking the latest YSI version..  | 
[20:43:21]  |                                     | 
[20:43:21]  ======================================= 
[20:43:21]  
[20:43:21] *** Audio Plugin: Started TCP server on port 7777
[20:43:21] [system] Business 1 spawned.
[20:43:21] [system] Business 2 spawned.
[20:43:21] [system] Business 3 spawned.
[20:43:21] [system] Business 4 spawned.
[20:43:21] [system] Business 7 spawned.
[20:43:21] [system] Business 8 spawned.
[20:43:21] [system] Business 9 spawned.
[20:43:21] [system] Business 10 spawned.
[20:43:21] [system] Business 11 spawned.
[20:43:21] [system] Business 12 spawned.
[20:43:21] [system] Business 13 spawned.
[20:43:22] Gate berhasil dimuat.
[20:43:22] WorkShop Berhasil Dimuat
[20:43:22] ModShop Berhasil Dimuat
[20:43:22] Rent Berhasil Dimuat
[20:43:22] Objects loaded successfully.
[20:43:30]  
[20:43:30] SERVER SUDAH MULAI BERJALAN
[20:43:30]  
[20:43:30] Number of vehicle models: 71
[20:43:30]  
[20:43:30]  ========================================== 
[20:43:30]  |                                        | 
[20:43:30]  |  A new version (v3.09.0684) of YSI is  | 
[20:43:30]  |            available from:             | 
[20:43:30]  |                                        | 
[20:43:30]  |     www.y-less.com/YSI/YSI_1.0.zip     | 
[20:43:30]  |                                        | 
[20:43:30]  | Changelog:                             | 
[20:43:30]  |                                        | 
[20:43:30]  |   1.04.0000:                           | 
[20:43:30]  |                                        | 
[20:43:30]  |   RC 1 for YSI 3.0.  Available from:   | 
[20:43:30]  | http://www.y-less.com/YSI/YSI_3.0.rar  | 
[20:43:30]  | - includes MANY new libraries and      | 
[20:43:30]  | fixes, see                             | 
[20:43:30]  | http://forum.sa-mp.com/showthread.php? | 
[20:43:30]  | p=1425938 for more information, with   | 
[20:43:30]  | more topics and updates due over the   | 
[20:43:30]  | next few weeks.  In brief: Added       | 
[20:43:30]  | "y_inline", "y_text", "y_users",       | 
[20:43:30]  | "y_uvar", "y_svar", "y_remote";        | 
[20:43:30]  | updated "y_timers", "y_iter"; MANY     | 
[20:43:30]  | MANY fixes and tweaks in almost every  | 
[20:43:30]  | other library.                         | 
[20:43:30]  |                                        | 
[20:43:30]  |   3.00.0000:                           | 
[20:43:30]  |                                        | 
[20:43:30]  |   YSI 3.0 released!  Now includes the  | 
[20:43:30]  | "y_text" library for better messages,  | 
[20:43:30]  | and a reworked "y_classes" library.    | 
[20:43:30]  | Largely documented here                | 
[20:43:30]  | "http://forum.sa-mp.com/showthread.php | 
[20:43:30]  | ?t=321092".                            | 
[20:43:30]  |                                        | 
[20:43:30]  |   3.01.0002:                           | 
[20:43:30]  |                                        | 
[20:43:30]  |   Small fixes to "y_text" and          | 
[20:43:30]  | "y_classes".                           | 
[20:43:30]  |                                        | 
[20:43:30]  |   3.09.0684:                           | 
[20:43:30]  |                                        | 
[20:43:30]  |   Reverted to old download location.   | 
[20:43:30]  | Improved (and fixed) version checks;   | 
[20:43:30]  | added y_bitmap, y_areas, y_races,      | 
[20:43:30]  | y_zonenames, better documentation;     | 
[20:43:30]  | MANY other bug fixes - see the github  | 
[20:43:30]  | repository for more details:           | 
[20:43:30]  |                                        | 
[20:43:30]  ========================================== 
[20:43:30]  
[20:43:30] New version of CrashDetect is available for download (4.13)
[20:44:26] [connection] 192.168.43.57:57438 requests connection cookie.
[20:44:27] [connection] incoming connection: 192.168.43.57:57438 id: 0
[20:44:27] [join] Donna_Bellic has joined the server (0:192.168.43.57)
[20:44:28] [debug] Run time error 4: "Array index out of bounds"
[20:44:28] [debug]  Accessing element at negative index -1
[20:44:28] [debug] AMX backtrace:
[20:44:28] [debug] #0 000eea50 in public AutoPark () from GameMode.amx
[20:44:29] [debug] Run time error 4: "Array index out of bounds"
[20:44:29] [debug]  Accessing element at negative index -1
[20:44:29] [debug] AMX backtrace:
[20:44:29] [debug] #0 000eea50 in public AutoPark () from GameMode.amx
[20:44:30] [debug] Run time error 4: "Array index out of bounds"
[20:44:30] [debug]  Accessing element at negative index -1
[20:44:30] [debug] AMX backtrace:
[20:44:30] [debug] #0 000eea50 in public AutoPark () from GameMode.amx
[20:44:31] [debug] Run time error 4: "Array index out of bounds"
[20:44:31] [debug]  Accessing element at negative index -1
[20:44:31] [debug] AMX backtrace:
[20:44:31] [debug] #0 000eea50 in public AutoPark () from GameMode.amx
[20:44:32] [debug] Run time error 4: "Array index out of bounds"
[20:44:32] [debug]  Accessing element at negative index -1
[20:44:32] [debug] AMX backtrace:
[20:44:32] [debug] #0 000eea50 in public AutoPark () from GameMode.amx
[20:44:33] [debug] Run time error 4: "Array index out of bounds"
[20:44:33] [debug]  Accessing element at negative index -1
[20:44:33] [debug] AMX backtrace:
[20:44:33] [debug] #0 000eea50 in public AutoPark () from GameMode.amx
[20:44:34] [debug] Run time error 4: "Array index out of bounds"
[20:44:34] [debug]  Accessing element at negative index -1
[20:44:34] [debug] AMX backtrace:
[20:44:34] [debug] #0 000eea50 in public AutoPark () from GameMode.amx
[20:44:38] Donna_Bellic has logged in.
[20:44:38]  Loading Donna_Bellic's vehicles.
[20:44:38]  Loading Donna_Bellic's Rent Vehicle.
[20:44:38] [debug] Run time error 4: "Array index out of bounds"
[20:44:38] [debug]  Accessing element at index 2 past array upper bound 1
[20:44:38] [debug] AMX backtrace:
[20:44:38] [debug] #0 000eea7c in public AutoPark () from GameMode.amx
[20:44:39] [debug] Run time error 4: "Array index out of bounds"
[20:44:39] [debug]  Accessing element at index 2 past array upper bound 1
[20:44:39] [debug] AMX backtrace:
[20:44:39] [debug] #0 000eea7c in public AutoPark () from GameMode.amx
[20:44:40] [debug] Run time error 4: "Array index out of bounds"
[20:44:40] [debug]  Accessing element at index 2 past array upper bound 1
[20:44:40] [debug] AMX backtrace:
[20:44:40] [debug] #0 000eea7c in public AutoPark () from GameMode.amx
[20:44:41] [debug] Run time error 4: "Array index out of bounds"
[20:44:41] [debug]  Accessing element at index 2 past array upper bound 1
[20:44:41] [debug] AMX backtrace:
[20:44:41] [debug] #0 000eea7c in public AutoPark () from GameMode.amx
[20:44:42] [debug] Run time error 4: "Array index out of bounds"
[20:44:42] [debug]  Accessing element at index 2 past array upper bound 1
[20:44:42] [debug] AMX backtrace:
[20:44:42] [debug] #0 000eea7c in public AutoPark () from GameMode.amx
[20:44:43] [debug] Run time error 4: "Array index out of bounds"
[20:44:43] [debug]  Accessing element at index 2 past array upper bound 1
[20:44:43] [debug] AMX backtrace:
[20:44:43] [debug] #0 000eea7c in public AutoPark () from GameMode.amx
[20:44:44] [debug] Run time error 4: "Array index out of bounds"
[20:44:44] [debug]  Accessing element at index 2 past array upper bound 1
[20:44:44] [debug] AMX backtrace:
[20:44:44] [debug] #0 000eea7c in public AutoPark () from GameMode.amx
[20:44:45]  Unloading Donna_Bellic's vehicles.
[20:44:45]  Unloading Donna_Bellic's Rent Vehicle.
[20:44:45] [part] Donna_Bellic has left the server (0:1)
Reply
#2

Show your AutoPark function
Reply
#3

Quote:
Originally Posted by Misiur
Посмотреть сообщение
Show your AutoPark function
Код:
forward AutoPark();
public AutoPark()
{
	for(new x; x<=MAX_PLAYERS;x++)
	{
	    if(IsPlayerConnected(x))
	    {
			for(new v=0;v<MAX_PLAYERVEHICLES; v++)
			{
					new Float:vx, Float:y, Float:z, Float:angle, Float:health;
				 	GetVehicleDamageStatus(PlayerVehicleInfo[x][v][pvId], PlayerVehicleInfo[x][v][pvStatus][0], PlayerVehicleInfo[x][v][pvStatus][1], PlayerVehicleInfo[x][v][pvStatus][2], PlayerVehicleInfo[x][v][pvStatus][3]);
					GetVehicleHealth(PlayerVehicleInfo[x][v][pvId], health);
					if(PlayerInfo[x][pLockCar] == GetPlayerVehicleID(x)) PlayerInfo[x][pLockCar] = INVALID_VEHICLE_ID;
					GetVehiclePos(PlayerVehicleInfo[x][v][pvId], vx, y, z);
					GetVehicleZAngle(PlayerVehicleInfo[x][v][pvId], angle);
					PlayerVehicleInfo[x][v][pvPosX] = vx;
					PlayerVehicleInfo[x][v][pvPosY] = y;
					PlayerVehicleInfo[x][v][pvPosZ] = z;
					PlayerVehicleInfo[x][v][pvPosAngle] = angle;
					PlayerVehicleInfo[x][v][pvHealth] = health;
			}
			new Float:vx,Float:y,Float:z,Float:a, Float:health;
		 	GetVehicleDamageStatus(PlayerRentInfo[x][prId], PlayerRentInfo[x][prStatus][0], PlayerRentInfo[x][prStatus][1], PlayerRentInfo[x][prStatus][2], PlayerRentInfo[x][prStatus][3]);
			GetVehicleHealth(PlayerRentInfo[x][prId], health);
			GetVehiclePos(PlayerRentInfo[x][prId], vx, y, z);
			GetVehicleZAngle(PlayerRentInfo[x][prId], a);
			PlayerRentInfo[x][prPosX] = vx;
			PlayerRentInfo[x][prPosY] = y;
			PlayerRentInfo[x][prPosZ] = z;
			PlayerRentInfo[x][prPosAngle] = a;
			PlayerRentInfo[x][prHealth] = health;
		    for(new i = 0; i <= MAX_WSCAR; i++)
		    {
			    new bos = PlayerInfo[x][pWSBos];
				GetVehiclePos(WsInfo[bos][wsVehicleId][i], vx, y, z);
				GetVehicleZAngle(WsInfo[bos][wsVehicleId][i], a);
				WsInfo[bos][wsVehicleX][i] = vx;
				WsInfo[bos][wsVehicleY][i] = y;
				WsInfo[bos][wsVehicleZ][i] = z;
				WsInfo[bos][wsVehicleAngle][i] = a;
			}
		}
	}
}
Reply
#4

Compile the script in -d3 and re run the server and post the server log.
Reply
#5

I think these lines are causing that runtime error, because you simply didn't check if "bos" is valid array index.
Код:
new bos = PlayerInfo[x][pWSBos];
GetVehiclePos(WsInfo[bos][wsVehicleId][i], vx, y, z);
GetVehicleZAngle(WsInfo[bos][wsVehicleId][i], a);
WsInfo[bos][wsVehicleX][i] = vx;
WsInfo[bos][wsVehicleY][i] = y;
WsInfo[bos][wsVehicleZ][i] = z;
WsInfo[bos][wsVehicleAngle][i] = a;
Remove them with these:
Код:
new bos = PlayerInfo[x][pWSBos];
if(bos == -1)
	continue;
GetVehiclePos(WsInfo[bos][wsVehicleId][i], vx, y, z);
GetVehicleZAngle(WsInfo[bos][wsVehicleId][i], a);
WsInfo[bos][wsVehicleX][i] = vx;
WsInfo[bos][wsVehicleY][i] = y;
WsInfo[bos][wsVehicleZ][i] = z;
WsInfo[bos][wsVehicleAngle][i] = a;
Edit: If it doesn't fix your problem, try recompile your script with -d3 flag as Sreyas said.
Reply
#6

Quote:
Originally Posted by X337
Посмотреть сообщение
I think these lines are causing that runtime error, because you simply didn't check if "bos" is valid array index.
Код:
new bos = PlayerInfo[x][pWSBos];
GetVehiclePos(WsInfo[bos][wsVehicleId][i], vx, y, z);
GetVehicleZAngle(WsInfo[bos][wsVehicleId][i], a);
WsInfo[bos][wsVehicleX][i] = vx;
WsInfo[bos][wsVehicleY][i] = y;
WsInfo[bos][wsVehicleZ][i] = z;
WsInfo[bos][wsVehicleAngle][i] = a;
Remove them with these:
Код:
new bos = PlayerInfo[x][pWSBos];
if(bos == -1)
	continue;
GetVehiclePos(WsInfo[bos][wsVehicleId][i], vx, y, z);
GetVehicleZAngle(WsInfo[bos][wsVehicleId][i], a);
WsInfo[bos][wsVehicleX][i] = vx;
WsInfo[bos][wsVehicleY][i] = y;
WsInfo[bos][wsVehicleZ][i] = z;
WsInfo[bos][wsVehicleAngle][i] = a;
Edit: If it doesn't fix your problem, try recompile your script with -d3 flag as Sreyas said.
Код:
C:\Users\Wahyu\Music\SA-MP\gamemodes\GameMode.pwn(43956) : warning 219: local variable "string" shadows a variable at a preceding level
Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


1 Warning.
Reply
#7

Quote:
Originally Posted by Wahyu33
Посмотреть сообщение
Код:
C:\Users\Wahyu\Music\SA-MP\gamemodes\GameMode.pwn(43956) : warning 219: local variable "string" shadows a variable at a preceding level
Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


1 Warning.
Show me line 43956.
Reply
#8

Quote:
Originally Posted by TopShooter
Посмотреть сообщение
Show me line 43956.
Код:
	if(PlayerInfo[playerid][pMaskuse] == 1)
	{
	    new string[128];
		format(string, sizeof(string), "Stranger_%d Whispers: %s", RandMask[playerid], whisper);
		SetPlayerChatBubble(playerid, string, COLOR_WHITE, 3.0, 8000);
		ProxDetector(3.0, playerid, string,COLOR_FADE1,COLOR_FADE2,COLOR_FADE3,COLOR_FADE4,COLOR_FADE5);
	}
Reply
#9

Quote:
Originally Posted by Wahyu33
Посмотреть сообщение
Код:
C:\Users\Wahyu\Music\SA-MP\gamemodes\GameMode.pwn(43956) : warning 219: local variable "string" shadows a variable at a preceding level
Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


1 Warning.
not working
Reply
#10

PHP код:
        if(PlayerInfo[playerid][pMaskuse] == 1)
    {
        new 
string2[128];
        
format(string2sizeof(string2), "Stranger_%d Whispers: %s"RandMask[playerid], whisper);
        
SetPlayerChatBubble(playeridstring2COLOR_WHITE3.08000);
        
ProxDetector(3.0playeridstring2,COLOR_FADE1,COLOR_FADE2,COLOR_FADE3,COLOR_FADE4,COLOR_FADE5);
    } 
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)