SA-MP Forums Archive
Pawno Crashes :S - 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: Pawno Crashes :S (/showthread.php?tid=248325)



Pawno Crashes :S - Skillet_Fan - 13.04.2011

Everytime I try to compile this GameMode, my compiler crashes and I can't find the problem :S

PasteBin: http://pastebin.com/CNY39cDF


Re: Pawno Crashes :S - blazee14 - 13.04.2011

Something wrong with your computer because it's not the fault of the script that is crashing, run a registry scan and anti-virus and fix any issues that appears


Re: Pawno Crashes :S - Kyle - 13.04.2011

This is your problem:

new CarCheck = GetPlayerVehicleID(playerid);


Re: Pawno Crashes :S - Kyle - 13.04.2011

Quote:
Originally Posted by blazee14
Посмотреть сообщение
Something wrong with your computer because it's not the fault of the script that is crashing, run a registry scan and anti-virus and fix any issues that appears
Stop lying fag.


Re: Pawno Crashes :S - blazee14 - 13.04.2011

Quote:
Originally Posted by KyleSmith
Посмотреть сообщение
Stop lying fag.
First of don't disrespect and second of don't double post, and i did not saw that ok so relax gezz


Re: Pawno Crashes :S - Skillet_Fan - 13.04.2011

Quote:
Originally Posted by KyleSmith
Посмотреть сообщение
This is your problem:

new CarCheck = GetPlayerVehicleID(playerid);
:S If thats the problem, then how do i fix it?


Re: Pawno Crashes :S - ronnie3148 - 13.04.2011

Line 52...

Код:
        DisableInteriorEnterExits(); //Disables yellow marker
        EnableStuntBonusForAll(0);//No Stunts!
//=======================================CLASS=======================================//
        AddPlayerClass(250, 1446.4160, -2286.8571, 13.5468, 269.1425, 0, 0, 0, 0, 0, 0); //Citizen
        AddPlayerClass(56, 1446.4160, -2286.8571, 13.5468, 269.1425, 0, 0, 0, 0, 0, 0);  //Citizen
        AddPlayerClass(280, 1446.4160, -2286.8571, 13.5468, 269.1425, 0, 0, 0, 0, 0, 0); //Police
        AddPlayerClass(281, 1446.4160, -2286.8571, 13.5468, 269.1425, 0, 0, 0, 0, 0, 0); //Police
        AddPlayerClass(7, 1446.4160, -2286.8571, 13.5468, 269.1425, 0, 0, 0, 0, 0, 0); //Criminal
        AddPlayerClass(29, 1446.4160, -2286.8571, 13.5468, 269.1425, 0, 0, 0, 0, 0, 0); //Criminal
        AddPlayerClass(294, 1446.4160, -2286.8571, 13.5468, 269.1425, 0, 0, 0, 0, 0, 0); //Admin
        AddPlayerClass(211, 1446.4160, -2286.8571, 13.5468, 269.1425, 0, 0, 0, 0, 0, 0); //Admin
//========================================CARS========================================//
        Cars[Police] = CreateVehicle(596, 1536.000244, -1667.221557, 13.102879, 0.564065, -1, -1,900);
        Cars[Police] = CreateVehicle(596, 1536.100463, -1677.430908, 13.104556, 0.564411, -1, -1,900);
        Cars[Police] = CreateVehicle(596, 1585.333129, -1672.058471, 5.613227, 272.017883, -1, -1,900);
        Cars[Police] = CreateVehicle(596, 1585.189086, -1668.016113, 5.614768 ,268.647460, -1, -1,900);



Re: Pawno Crashes :S - Skillet_Fan - 13.04.2011

:P Nvm.. It works now tnx to KyleSmith <3........

Seems like this was the problem ^^
Код:
new CarCheck = GetPlayerVehicleID(playerid);
But can someone tell me y that is the problem?


Re: Pawno Crashes :S - ronnie3148 - 13.04.2011

Try putting new CarCheck = GetPlayerVehicleID(playerid); inside of your if statements(or in your functions) and not at the top... as such

Код:
	if(strcmp(cmd, "/whatever", true) == 0)
	{
	    if(IsPlayerConnected(playerid))
	    {
               new CarCheck = GetPlayerVehicleID(playerid);
               if(IsAWhateverCar(CarCheck))
			{
                             then do whatever
                        }
            }
            return 1;
        }
tbh I haven't seen a script look for the vehicleid on the top... it probably keeps searching for the vehicleid throughout the whole script... but like I said it should work inside of the if statements


Re: Pawno Crashes :S - Skillet_Fan - 13.04.2011

Quote:
Originally Posted by ronnie3148
Посмотреть сообщение
Try putting new CarCheck = GetPlayerVehicleID(playerid); inside of your if statements(or in your functions) and not at the top... as such

Код:
	if(strcmp(cmd, "/whatever", true) == 0)
	{
	    if(IsPlayerConnected(playerid))
	    {
               new CarCheck = GetPlayerVehicleID(playerid);
               if(IsAWhateverCar(CarCheck))
			{
                             then do whatever
                        }
            }
            return 1;
        }
tbh I haven't seen a script look for the vehicleid on the top... it probably keeps searching for the vehicleid throughout the whole script... but like I said it should work inside of the if statements
I was just trying to keep the code clean Although that code might help.. Ill check it later xD