Pawno Crashes :S
#1

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

PasteBin: http://pastebin.com/CNY39cDF
Reply
#2

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
Reply
#3

This is your problem:

new CarCheck = GetPlayerVehicleID(playerid);
Reply
#4

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.
Reply
#5

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
Reply
#6

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

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

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);
Reply
#8

: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?
Reply
#9

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
Reply
#10

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
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)