SA-MP Forums Archive
problem with command that crash the server ): - 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)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: problem with command that crash the server ): (/showthread.php?tid=133226)



problem with command that crash the server ): - aviv258958 - 11.03.2010

Pleasee help!!

Код:
	if(strcmp(cmd, "/buyable", true) == 0)
	{
  new file2[] = "/ServerFiles/Admins.ini";
  if(fsearch(file2,playername, false)==0)return 0;
	if(!(IsPlayerInAnyVehicle(playerid)))return SendClientMessage(playerid,red,"/Buyable - айрк бшлб,длрс мшлб едчщ");
	new vehicleid = GetPlayerVehicleID(playerid);
	format(file,sizeof(file),"Car/car%d.txt",GetPlayerVehicleID(playerid));
	dini_IntSet(file,"Buyable",1);
	dini_IntSet(file,"CarOwned",0);
	dini_Set(file,"CarOwner","none");
	dini_IntSet(file,"CarLocked",0);
	format(String,sizeof(String),".мшлб фший рйъп мчрййд , %s [ID: %d] дфлъ аъ дшлб",GetVehicleName(vehicleid), vehicleid);
	SendClientMessage(playerid,COLOR_LIGHTBLUE,String);
	PlayerPlaySound(playerid,1056,0.0, 0.0, 0.0);
	return 1;
	}
how to fix it ?? ): i really need it!



Re: problem with command that crash the server ): - lameguy - 11.03.2010

I'm not sure, but it might be these lines:

Код:
if(!(IsPlayerInAnyVehicle(playerid)))return SendClientMessage(playerid,red,"/Buyable - айрк бшлб,длрс мшлб едчщ");
format(String,sizeof(String),".мшлб фший рйъп мчрййд , %s [ID: %d] дфлъ аъ дшлб",GetVehicleName(vehicleid), vehicleid);
I believe pawn doesn't support those characters (айрк бшлб,длрс мшлб едчщ) and they may cause your crash.
I suggest you to stay on normal characters when scripting. (abcd...wxyz)


Re: problem with command that crash the server ): - aviv258958 - 11.03.2010

dont worry, its hebrew it just dont show it in it...
even if i type in english it dosnet matter..



Re: problem with command that crash the server ): - aviv258958 - 11.03.2010

BUMP!!
really need help please!!


Re: problem with command that crash the server ): - lameguy - 11.03.2010

You had
Код:
new file2[] = ...
Maybe you could change it to
new file2[32] = ...

This is again just a guess because i can't see any clear reason for crash.


Re: problem with command that crash the server ): - aviv258958 - 13.03.2010

i fixed it , but its dont the 32 thing someone fixed it to me..