some debugs
#1

Код:
[12:34:29] [debug] AMX backtrace:
[12:34:29] [debug] #0 002b5ef0 in MySQL__SaveHouse (_houseid=428) at D:\Current Stuffs\Desktop\New folder\script (1)ss\script\gamemodes\Kopija.pwn:22778
[12:34:29] [debug] #1 002b61f8 in public SaveHouseTimer (_hid=427) at D:\Current Stuffs\Desktop\New folder\script (1)ss\script\gamemodes\Kopija.pwn:22802
[12:34:57] [debug] Run time error 4: "Array index out of bounds"
[12:34:57] [debug]  Accessing element at index 255 past array upper bound 99
[12:34:57] [debug] AMX backtrace:
[12:34:57] [debug] #0 00229d6c in public keypad_OnPlayerDisconnect (playerid=1, reason=1) at D:\Current Stuffs\Desktop\New folder\script (1)ss\script\gamemodes\Kopija.pwn:12715
[12:34:57] [debug] #1 native CallLocalFunction () from sampsvr-port_7775
[12:34:57] [debug] #2 0001156c in public Itter_OnPlayerDisconnect (playerid=1, reason=1) at D:\Current Stuffs\Desktop\New folder\script (1)ss\script\pawno\include\keypad.inc:310
[12:34:57] [debug] #3 0000b1d4 in public OnPlayerDisconnect (playerid=1, reason=1) at D:\Current Stuffs\Desktop\New folder\script (1)ss\script\pawno\include\YSI\y_iterate.inc:909
Code 22778
Код:
stock MySQL__SaveHouse(_houseid)
{
	new casa[ 30 ], iQuery[ 512 ], hhowner[ MAX_STRING ];
	format(casa, sizeof(casa), "Houses/Casa%d.txt", _houseid);
	new intpack = dini_Int(casa,"interiorpack");
	myStrcpy(hhowner, dini_Get(casa,"owner"));
	new till = dini_Int(casa,"till");
	new zone[ 32 ];
	GetZone(House[_houseid][House_x],House[_houseid][House_y],House[_houseid][House_z], zone); //this line
	format(iQuery, sizeof(iQuery), "\
		INSERT INTO `house` ( `id`, `interior`, `owner`, `till`, `location`) VALUES ('%d', '%d', '%s', '%d', '%s')\
		ON DUPLICATE KEY UPDATE id='%d',interior='%d',owner='%s',till='%d', location='%s'",
		_houseid, intpack, hhowner, till,zone,
		_houseid, intpack, hhowner, till,zone
	);
	mysql_query(iQuery);
	return 1;
}
code 22802
Код:
public SaveHouseTimer(_hid)
{
	#pragma unused _hid
	if(SAVE_HOUSE >= sizeof(House))
	{
	    SAVE_HOUSE = 0;
	    SAVE_BIZ = 0;
	    SAVE_CAR = 1;
	    SetTimerEx("SaveBizTimer", 500, false, "d", SAVE_BIZ);
	    return 1;
	}
    SAVE_HOUSE++;
    MySQL::SaveHouse(SAVE_HOUSE);
   SetTimerEx("SaveHouseTimer", 100, false, "d", SAVE_HOUSE); // this line
       return 1;
}
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)