need help
#1

ok so this is what i get

C:\Users\Gharrett\Desktop\New folder\gamemodes\hilol.pwn(4963) : error 029: invalid expression, assumed zero
C:\Users\Gharrett\Desktop\New folder\gamemodes\hilol.pwn(4963) : warning 215: expression has no effect
C:\Users\Gharrett\Desktop\New folder\gamemodes\hilol.pwn(4963) : error 001: expected token: ";", but found "]"
C:\Users\Gharrett\Desktop\New folder\gamemodes\hilol.pwn(4963) : error 029: invalid expression, assumed zero
C:\Users\Gharrett\Desktop\New folder\gamemodes\hilol.pwn(4963) : fatal error 107: too many error messages on one line

Compilation aborted.Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase


4 Errors.


and this is the line its on

Код:
public OnPlayerExitVehicle(playerid, vehicleid)
{
 switch(Seatbelt(playerid))
	{
	    case 1:
	    {
			new string[128];
	        if(IsABike(vehicleid))
			{
				SendClientMessageEx(playerid, COLOR_WHITE, "You have taken off your helmet.");
				format(string, sizeof(string), "* %s reaches for their helmet, and takes it off.", GetPlayerNameEx(playerid));
			}
			else
			{
				SendClientMessageEx(playerid, COLOR_WHITE, "You have taken off your seatbelt.");
				format(string, sizeof(string), "* %s reaches for their seatbelt, and unbuckles it.", GetPlayerNameEx(playerid));
			}
			ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
  			Seatbelt[playerid] = 0;
	    }
	}

	if(GetPVarInt(playerid,"fpsused") == 1)
	{
		SetPVarInt(playerid,"fpsused",0);
		SetCameraBehindPlayer(playerid);
		DestroyPlayerObject(playerid,fps[playerid]);
	}

	if(arr_Wrecking[playerid] != INVALID_VEHICLE_ID)
	{
		arr_Wrecking[playerid] = INVALID_VEHICLE_ID;
		playerveh[playerid] = INVALID_VEHICLE_ID;
        KillTimer(TimerATACH[playerid]);
		DestroyObject(GetPVarInt(playerid, "WreckingGate"));
		DeletePVar(playerid, "WreckingGate");
	}

	if(GetPVarInt(playerid, "rccam") == 1)
	{
		DestroyVehicle(GetPVarInt(playerid, "rcveh"));
	    SetPlayerPos(playerid, GetPVarFloat(playerid, "rcX"), GetPVarFloat(playerid, "rcY"), GetPVarFloat(playerid, "rcZ"));
		DeletePVar(playerid, "rccam");
	    KillTimer(GetPVarInt(playerid, "rccamtimer"));
	}
	return 1;
}
i placed the screwed up line in Bold, and thats the errors that i get on that line, can anyone tell me what i am doing wrong?
Reply
#2

Is Seatbelt defined as a varible at the top of the script? If so, try changing its name to

pawn Код:
new VSeatBelt[MAX_PLAYERS]; // for example
The Variable name is the same as the function name (Seatbelt(playerid)).
Reply
#3

yes it is already defined at the top of the script, its rather odd
Reply
#4

Try changing its name.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)