Help with errors and a warning
#1

Hello I am getting these errors....
Код:
D:\New Folder\server\pawno\larp2.pwn(79057) : warning 209: function "OnPlayerEnterCt" should return a value
D:\New Folder\server\pawno\larp2.pwn(79077) : error 010: invalid function or declaration
D:\New Folder\server\pawno\larp2.pwn(79079) : error 010: invalid function or declaration
D:\New Folder\server\pawno\larp2.pwn(79087) : error 010: invalid function or declaration
Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


3 Errors.
here is the line 79057 I know its an warning, but would love to get rid of it..

Код:
public OnPlayerEnterCt(playerid)
{
	if(IsPlayerInAnyVehicle(playerid))
	{
		if(DrivingTest[playerid] == 1)
		{
			if(PlayerToPoint(5.0,playerid,1971.5177,-1930.0858,13.3958))
			{
                DrivingStep[playerid] = 2;
                SetPlayerCheckpoint(playerid, 1958.7378,-2078.0024,13.0875, 5.0);
			}
			else if(PlayerToPoint(5.0,playerid,1958.7378,-2078.0024,13.0875))
			{
                DrivingStep[playerid] = 3;
                SetPlayerCheckpoint(playerid, 2124.6372,-2116.1033,13.0379, 5.0);
			}
			else if(PlayerToPoint(5.0,playerid,2124.6372,-2116.1033,13.0379))
			{
                DrivingStep[playerid] = 4;
                SetPlayerCheckpoint(playerid, 2237.5308,-2129.1843,13.0497, 5.0);
			}
			else if(PlayerToPoint(5.0,playerid,2237.5308,-2129.1843,13.0497))
			{
                DrivingStep[playerid] = 5;
                SetPlayerCheckpoint(playerid, 2278.8250,-2087.8777,13.1134, 5.0);
			}
			else if(PlayerToPoint(5.0,playerid,2278.8250,-2087.8777,13.1134))//
			{
                DrivingStep[playerid] = 6;
                SetPlayerCheckpoint(playerid, 2220.8435,-2011.1965,13.0549, 5.0);
			}
			else if(PlayerToPoint(5.0,playerid,2220.8435,-2011.1965,13.0549))
			{
                DrivingStep[playerid] = 7;
                SetPlayerCheckpoint(playerid, 2222.1323,-1907.7750,13.0786, 5.0);
			}
			else if(PlayerToPoint(5.0,playerid,2222.1323,-1907.7750,13.0786))
			{
                DrivingStep[playerid] = 8;
                SetPlayerCheckpoint(playerid, 2095.5571,-1891.8268,13.0726, 5.0);
			}
			else if(PlayerToPoint(5.0,playerid,2095.5571,-1891.8268,13.0726))
			{
                DrivingStep[playerid] = 9;
                SetPlayerCheckpoint(playerid, 2056.0747,-1929.8429,13.0643, 5.0);
			}
			else if(PlayerToPoint(5.0,playerid,2056.0747,-1929.8429,13.0643))
			{
			    new Float:health;
			    new veh;
			    veh = GetPlayerVehicleID(playerid);
			    GetVehicleHealth(veh, health);
    		    if(health >= 600.0)
			    {
	    	    	SendClientMessage(playerid,COLOR_GREEN,"STATUS: You kept the vehicle almost fully unharmed, Passed.");
			    	PlayerInfo[playerid][pCarLic] = 1;
			    	SetVehicleToRespawn(veh);
			    	DrivingTest[playerid] = 0;
		    	 	DisablePlayerCheckpoint(playerid);
			    }
			    else
			    {
					SendClientMessage(playerid,COLOR_RED,"STATUS: You failed the test, better luck next time!");
					SetVehicleToRespawn(veh);
					DrivingTest[playerid] = 0;
					DisablePlayerCheckpoint(playerid);
			    }
                DrivingStep[playerid] = 0;
			}
			return 1;
		}
	}
}
here is the other errors...

Код:
   if(IsALicCar(newcar))//Taking Test
		{
		    if(DrivingTest[playerid] == 1)
			{
			    newcar = GetPlayerVehicleID(playerid);
				SendClientMessage(playerid, COLOR_WHITE, "   INFO: Go though the checkpoints to finish the test.");
				SendClientMessage(playerid,COLOR_LIGHTBLUE,"|| To pass the test, go though the designated area's, without banging up the car to badly. ||");
		 		SetPlayerCheckpoint(playerid, 1971.5177,-1930.0858,13.3958, 5.0);
				DrivingStep[playerid] = 1;
			}
			else
			{
   				SendClientMessage(playerid, COLOR_LIGHTRED, "  You are not taking the driving test !");
			}
		}
thanks ahead of time...
Reply
#2

Place 'return 1' at the end of the OnPlayerEnterCt.
Reply
#3

I already have return 1 at the end of the script

Код:
			    }
                DrivingStep[playerid] = 0;
			}
			return 1;
		}
	}
}
Reply
#4

That is not the 'end' of the script. The real end is right before the final brace.
Reply
#5

awesome that fixed that prob... what about my other errors
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)