Y_Ini writes any file = server crash
#1

Code:
[21:59:57] [debug] Server crashed while executing lkrpg.amx
[21:59:57] [debug] AMX backtrace:
[21:59:57] [debug] #0 00000037 in INI_AddToBuffer (INI:file=50, name[]=@00000033 "", data[]=@0249fd34 "-0000001620237623") at <unknown file>:0
[21:59:57] [debug] #1 000488d4 in ?? (50, 51, 0, 0, 38403476, 6129604, 4, 1, 1, 38403504, ... <3 more arguments>) at C:\Users\Jurcomm\Desktop\LK MAIN\pawno\include\YSI\y_ini.inc:1073
[21:59:57] [debug] #2 00000037 in public @yC_sacuvajacounte () at <unknown file>:0
[21:59:57] [debug] #3 native CallRemoteFunction () in samp03svr
[21:59:57] [debug] #4 00055f20 in Command_Process (playerid=1, cmdtext[]=@0248c5e4 "/sacuvajacounte", help=0) at C:\Users\Jurcomm\Desktop\LK MAIN\pawno\include\YSI\y_commands.inc:2503
[21:59:57] [debug] #5 00055560 in ?? (1, 38323684) at C:\Users\Jurcomm\Desktop\LK MAIN\pawno\include\YSI\y_commands.inc:2297
[21:59:57] [debug] #6 0003e5e8 in public ac_OnPlayerCommandText (playerid=1, cmdtext[]=@0248c5e4 "/sacuvajacounte") at C:\Users\Jurcomm\Desktop\LK MAIN\pawno\include\YSI\y_hooks/impl.inc:946
[21:59:57] [debug] #7 00020008 in public OnPlayerCommandText (playerid=1, cmdtext[]=@0248c5e4 "/sacuvajacounte") at C:\Users\Jurcomm\Desktop\LK MAIN\pawno\include\StefkeAc.inc:4733
This is what happens whenever I use cmd which writes any file using Y_Ini. I can't update Y_Ini to v4 bcz it would need so many things to recreate in gamemode.
Reply
#2

Glad you found the problem. Which Y_INI version are you using?

Also, post just one CMD which saves something.
Reply
#3

Quote:
Originally Posted by Y_Less
View Post
Does the file open? Does the target directory exist? From the sounds of it you are on YSI 3, which is very old.
I would ask too: "Does the file exists? And if it does, do you check with fexist?".
Reply
#4

Quote:
Originally Posted by Y_Less
View Post
Does the file open? Does the target directory exist? From the sounds of it you are on YSI 3, which is very old.
I know what happens when directory doesn't exist but it exist and file too. I think that Iam missing some files (includes), or my host maybe have limited server size (it is already 135mb). Iam gonna edit this if that was a problem
Reply
#5

Are you trying to open a 135mb file?
Reply
#6

Yeah I was missing some files but now just one thing is still not OK and it wasn't before too:
Code:
[00:07:41] [debug] Run time error 4: "Array index out of bounds"
[00:07:41] [debug]  Attempted to read/write array element at negative index -1
[00:07:41] [debug] AMX backtrace:
[00:07:41] [debug] #0 0058a720 in public @_yCtunecar (playerid=0, params[]=@0248c4ac "", help=0) at C:\Users\Jurcomm\Desktop\LK MAIN\gamemodes\lkrpg.pwn:24772
[00:07:41] [debug] #1 0058a548 in public @yC_tunecar (a=0, b[]=@0248c4ac "", c=0, i=0) at C:\Users\Jurcomm\Desktop\LK MAIN\gamemodes\lkrpg.pwn:24764
[00:07:41] [debug] #2 native CallRemoteFunction () in samp03svr
[00:07:41] [debug] #3 00055f20 in Command_Process (playerid=0, cmdtext[]=@0248c488 "/tunecar", help=0) at C:\Users\Jurcomm\Desktop\LK MAIN\pawno\include\YSI\y_commands.inc:2503
[00:07:41] [debug] #4 00055560 in ?? (0, 38323336) at C:\Users\Jurcomm\Desktop\LK MAIN\pawno\include\YSI\y_commands.inc:2297
[00:07:41] [debug] #5 0003e5e8 in public ac_OnPlayerCommandText (playerid=0, cmdtext[]=@0248c488 "/tunecar") at C:\Users\Jurcomm\Desktop\LK MAIN\pawno\include\YSI\y_hooks/impl.inc:946
[00:07:41] [debug] #6 00020008 in public OnPlayerCommandText (playerid=0, cmdtext[]=@0248c488 "/tunecar") at C:\Users\Jurcomm\Desktop\LK MAIN\pawno\include\StefkeAc.inc:4733
This command is the only one that makes this errors when it's used by someone
Reply
#7

Show it.

@yC_tunecar
lkrpg.pwn:24772
Reply
#8

Post the command maybe?
Reply
#9

Is the error still occurs while you test in windows?
Reply
#10

Code:
YCMD:tunecar(playerid, params[], help)
{
	#pragma unused params
	#pragma unused help
	new playerstate = GetPlayerState(playerid);
	if(playerstate == PLAYER_STATE_DRIVER)
	{
        if(!IsPlayerInRangeOfPoint(playerid,5.0,1375.5538,-1889.4302,13.7439)) return Error(playerid, "You are not in the tune shop !");
		if(GetPlayerVehicleID(playerid) != VoziloInfo[PlayerInfo[playerid][pPosedovanjeAuta]][vID] && GetPlayerVehicleID(playerid) != VoziloInfo[PlayerInfo[playerid][pPosedovanjeAuta2]][vID]) return Error(playerid, "You can tune just your private vehicle!");
		new pveh = GetVehicleModel(GetPlayerVehicleID(playerid));
		switch(pveh)
		{
			case 562,565,559,561,560,575,534,567,536,535,576,411,579,602,496,518,527,589,597,419,
			533,526,474,545,517,410,600,436,580,439,549,491,445,604,507,585,587,466,492,546,551,516,
			426,547,405,409,550,566,406,540,421,529,431,438,437,420,525,552,416,433,427,490,528,
			407,544,470,598,596,599,601,428,499,609,524,578,486,573,455,588,403,514,423,
			414,443,515,456,422,482,530,418,572,413,440,543,583,478,554,402,542,603,475,568,504,457,
			483,508,429,541,415,480,434,506,451,555,477,400,404,489,479,442,458,467,558:
			{
				ShowPlayerDialog(playerid, 1338, DIALOG_STYLE_LIST, "Tune car menu","Paint Jobs\nColors\nExhausts\nFront Bumper\nRear Bumper\nRoof\nSpoilers\nSide Skirts\nBullbars\nWheels\nCar Stereo\nNext page", "Select", "Exit");
				return SendClientMessage(playerid, 0xFFFF00AA, "[.::LK~INFO::.] Choose...");
			}
			default: return Error(playerid, "You can not tune this vehicle!");
		}
	}
	else return Error(playerid, "You must be driver!");
	return 1;
}
I have not tested it in windows but Iam going to do it now...
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)