Help me with these warnings please.
#1

Help me please.
Warnings

Код:
C:\Documents and Settings\Owner\Desktop\ship\gamemodes\stunt.pwn(45) : warning 225: unreachable code
C:\Documents and Settings\Owner\Desktop\ship\gamemodes\stunt.pwn(1998) : warning 203: symbol is never used: "aa"
C:\Documents and Settings\Owner\Desktop\ship\gamemodes\stunt.pwn(1998 -- 2027) : warning 203: symbol is never used: "area69"
C:\Documents and Settings\Owner\Desktop\ship\gamemodes\stunt.pwn(1998 -- 2027) : warning 203: symbol is never used: "chilliad"
C:\Documents and Settings\Owner\Desktop\ship\gamemodes\stunt.pwn(1998 -- 2027) : warning 203: symbol is never used: "loop"
C:\Documents and Settings\Owner\Desktop\ship\gamemodes\stunt.pwn(1998 -- 2027) : warning 203: symbol is never used: "lsa"
C:\Documents and Settings\Owner\Desktop\ship\gamemodes\stunt.pwn(1998 -- 2027) : warning 203: symbol is never used: "lva"
Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


7 Warnings.
Lines

line 45
Код:
//Loop

	CreateDynamicObject(17310,1463.3770000,1851.6550000,13.2340000,0.0000000,150.4020000,90.0000000); //
line 1998 and the other warnings
Код:
public OnPlayerClickPlayer(playerid, clickedplayerid, source)
{
	return 1;
}
CMD:loop(playerid, params[])
{
	new str[128];
	if(GetPlayerState(playerid) != 1 && GetPlayerState(playerid) != 2 && GetPlayerState(playerid) != 3 && GetPlayerState(playerid) != 7)
	return SendClientMessage(playerid, COLOR_RED, "[Spawned]: You must be spawned, To use this command!");
	if(pInfo[playerid][Jail] == 1) return SendClientMessage(playerid, COLOR_RED, "[Error]: You are in jail, You cannot teleport!");
	if(InHouse[playerid] == 1) return SendClientMessage(playerid, COLOR_RED, "[Error]: You are inside the House, Cannot teleport!");
	if(pInfo[playerid][Jail] == 1) return SendClientMessage(playerid, COLOR_RED, "[Error]: You are in jail you cannot teleport!");
	if(InDM[playerid] >= 1) return SendClientMessage(playerid, COLOR_RED, "[Error]: You cannot teleport, You're in DM!");
	if(InP[playerid] >= 1) return SendClientMessage(playerid, COLOR_RED, "[Error]: You cannot use this command while in Parkour!");
	if(pInfo[playerid][Freeze] == 1) return SendClientMessage(playerid, COLOR_RED, "[Error]: You are frozen, Cannot use this command!");
	if(GetPlayerState(playerid) == PLAYER_STATE_PASSENGER) return SendClientMessage(playerid, COLOR_RED, "[Error]: You cannot teleport while in Passenger seat!");
	SetCameraBehindPlayer(playerid);
	if(IsPlayerInAnyVehicle(playerid))
	{
	    LinkVehicleToInterior(GetPlayerVehicleID(playerid), 0);
		SetVehiclePos(GetPlayerVehicleID(playerid), 1296.9932,1608.1838,5560.0220);
		SetVehicleZAngle(GetPlayerVehicleID(playerid), 178.7994);
	}
	else
	{
	    SetPlayerInterior(playerid, 0);
	    SetPlayerPos(playerid, 1312.0313,1604.5643,5560.4512);
	    SetPlayerFacingAngle(playerid, 160.9468);
	}
	format(str, sizeof(str), "[Teleport]: %s(%d) has teleport to Loop Fun (/loop)", GetName(playerid), playerid);
	SendClientMessageToAll(COLOR_YELLOW, str);
    GameTextForPlayer(playerid, "~w~Objects Loading...", 4000, 3);
	SetTimerEx("LoadedObjects", 5000, false, "i", playerid);
	TogglePlayerControllable(playerid, 0);
	return 1;
}

CMD:aa(playerid, params[])
{
	new str[128];
	if(GetPlayerState(playerid) != 1 && GetPlayerState(playerid) != 2 && GetPlayerState(playerid) != 3 && GetPlayerState(playerid) != 7)
	return SendClientMessage(playerid, COLOR_RED, "[Spawned]: You must be spawned, To use this command!");
	if(InP[playerid] >= 1) return SendClientMessage(playerid, COLOR_RED, "[Error]: You cannot use this command while in Parkour!");
	if(InDM[playerid] >= 1) return SendClientMessage(playerid, COLOR_RED, "[Error]: You cannot teleport, You're in DM!");
	if(pInfo[playerid][Jail] == 1) return SendClientMessage(playerid, COLOR_RED, "[Error]: You are in jail, You cannot teleport!");
	if(InHouse[playerid] == 1) return SendClientMessage(playerid, COLOR_RED, "[Error]: You are inside the House, Cannot teleport!");
	if(pInfo[playerid][Freeze] == 1) return SendClientMessage(playerid, COLOR_RED, "[Error]: You are frozen, Cannot use this command!");
	if(GetPlayerState(playerid) == PLAYER_STATE_PASSENGER) return SendClientMessage(playerid, COLOR_RED, "[Error]: You cannot teleport while in Passenger seat!");
	SetCameraBehindPlayer(playerid);
	if(IsPlayerInAnyVehicle(playerid))
	{
	    LinkVehicleToInterior(GetPlayerVehicleID(playerid), 0);
	    SetVehiclePos(GetPlayerVehicleID(playerid), 365.2483,2536.9805,16.2233);
	    SetVehicleZAngle(GetPlayerVehicleID(playerid), 176.2092);
	}
	else
	{
	    SetPlayerInterior(playerid, 0);
	    SetPlayerPos(playerid, 391.2109,2539.9592,16.5427);
	    SetPlayerFacingAngle(playerid, 142.9048);
	}
	format(str, sizeof(str), "[Teleport]: %s(%d) has teleport to Abandoned Airport (/aa)", GetName(playerid), playerid);
	SendClientMessageToAll(COLOR_YELLOW, str);
	return 1;
}

CMD:area69(playerid, params[])
{
	new str[128];
	if(GetPlayerState(playerid) != 1 && GetPlayerState(playerid) != 2 && GetPlayerState(playerid) != 3 && GetPlayerState(playerid) != 7)
	return SendClientMessage(playerid, COLOR_RED, "[Spawned]: You must be spawned, To use this command!");
	if(InP[playerid] >= 1) return SendClientMessage(playerid, COLOR_RED, "[Error]: You cannot use this command while in Parkour!");
	if(InDM[playerid] >= 1) return SendClientMessage(playerid, COLOR_RED, "[Error]: You cannot teleport, You're in DM!");
	if(pInfo[playerid][Jail] == 1) return SendClientMessage(playerid, COLOR_RED, "[Error]: You are in jail, You cannot teleport!");
	if(InHouse[playerid] == 1) return SendClientMessage(playerid, COLOR_RED, "[Error]: You are inside the House, Cannot teleport!");
	if(pInfo[playerid][Freeze] == 1) return SendClientMessage(playerid, COLOR_RED, "[Error]: You are frozen, Cannot use this command!");
	if(GetPlayerState(playerid) == PLAYER_STATE_PASSENGER) return SendClientMessage(playerid, COLOR_RED, "[Error]: You cannot teleport while in Passenger seat!");
	SetCameraBehindPlayer(playerid);
	if(IsPlayerInAnyVehicle(playerid))
	{
	    LinkVehicleToInterior(GetPlayerVehicleID(playerid), 0);
	    SetVehiclePos(GetPlayerVehicleID(playerid), 277.9872,2018.0955,17.2062);
	    SetVehicleZAngle(GetPlayerVehicleID(playerid), 266.8646);
	}
	else
	{
	    SetPlayerInterior(playerid, 0);
	    SetPlayerPos(playerid, 275.6482,2026.9867,17.6406);
	    SetPlayerFacingAngle(playerid, 269.1257);
	}
	format(str, sizeof(str), "[Teleport]: %s(%d) has teleport to Area 69 Stunts (/area69)", GetName(playerid), playerid);
	SendClientMessageToAll(COLOR_YELLOW, str);
	return 1;
}

CMD:lsa(playerid, params[])
{
	new str[128];
	if(GetPlayerState(playerid) != 1 && GetPlayerState(playerid) != 2 && GetPlayerState(playerid) != 3 && GetPlayerState(playerid) != 7)
	return SendClientMessage(playerid, COLOR_RED, "[Spawned]: You must be spawned, To use this command!");
	if(InP[playerid] >= 1) return SendClientMessage(playerid, COLOR_RED, "[Error]: You cannot use this command while in Parkour!");
	if(InDM[playerid] >= 1) return SendClientMessage(playerid, COLOR_RED, "[Error]: You cannot teleport, You're in DM!");
	if(pInfo[playerid][Jail] == 1) return SendClientMessage(playerid, COLOR_RED, "[Error]: You are in jail, You cannot teleport!");
	if(InHouse[playerid] == 1) return SendClientMessage(playerid, COLOR_RED, "[Error]: You are inside the House, Cannot teleport!");
	if(pInfo[playerid][Freeze] == 1) return SendClientMessage(playerid, COLOR_RED, "[Error]: You are frozen, Cannot use this command!");
	if(GetPlayerState(playerid) == PLAYER_STATE_PASSENGER) return SendClientMessage(playerid, COLOR_RED, "[Error]: You cannot teleport while in Passenger seat!");
	SetCameraBehindPlayer(playerid);
	if(IsPlayerInAnyVehicle(playerid))
	{
	    LinkVehicleToInterior(GetPlayerVehicleID(playerid), 0);
	    SetVehiclePos(GetPlayerVehicleID(playerid), 1854.4974,-2380.7664,13.1259);
	    SetVehicleZAngle(GetPlayerVehicleID(playerid), 243.1534);
	}
	else
	{
	    SetPlayerInterior(playerid, 0);
	    SetPlayerPos(playerid, 1838.6377,-2404.4272,13.5547);
	    SetPlayerFacingAngle(playerid, 1.3001);
	}
	format(str, sizeof(str), "[Teleport]: %s(%d) has teleport to Los Santos Airport (/lsa)", GetName(playerid), playerid);
	SendClientMessageToAll(COLOR_YELLOW, str);
	return 1;
}

CMD:chilliad(playerid, params[])
{
	new str[128];
	if(GetPlayerState(playerid) != 1 && GetPlayerState(playerid) != 2 && GetPlayerState(playerid) != 3 && GetPlayerState(playerid) != 7)
	return SendClientMessage(playerid, COLOR_RED, "[Spawned]: You must be spawned, To use this command!");
	if(InP[playerid] >= 1) return SendClientMessage(playerid, COLOR_RED, "[Error]: You cannot use this command while in Parkour!");
	if(InDM[playerid] >= 1) return SendClientMessage(playerid, COLOR_RED, "[Error]: You cannot teleport, You're in DM!");
	if(pInfo[playerid][Freeze] == 1) return SendClientMessage(playerid, COLOR_RED, "[Error]: You are frozen, Cannot use this command!");
	if(InHouse[playerid] == 1) return SendClientMessage(playerid, COLOR_RED, "[Error]: You are inside the House, Cannot teleport!");
	if(pInfo[playerid][Jail] == 1) return SendClientMessage(playerid, COLOR_RED, "[Error]: You are in jail you cannot teleport!");
	if(GetPlayerState(playerid) == PLAYER_STATE_PASSENGER) return SendClientMessage(playerid, COLOR_RED, "[Error]: You cannot teleport while in Passenger seat!");
	SetCameraBehindPlayer(playerid);
	if(IsPlayerInAnyVehicle(playerid))
	{
	    LinkVehicleToInterior(GetPlayerVehicleID(playerid), 0);
	    SetVehiclePos(GetPlayerVehicleID(playerid), -2251.6426,-1711.4546,479.7952);
	    SetVehicleZAngle(GetPlayerVehicleID(playerid), 73.6216);
	}
	else
	{
	    SetPlayerInterior(playerid, 0);
	    SetPlayerPos(playerid, -2314.1245,-1693.3069,482.5130);
	    SetPlayerFacingAngle(playerid, 355.9733);
	}
	format(str, sizeof(str), "[Teleport]: %s(%d) has teleport to Mount Chilliad (/chilliad)", GetName(playerid), playerid);
	SendClientMessageToAll(COLOR_YELLOW, str);
	return 1;
}

CMD:lva(playerid, params[])
{
	new str[128];
	if(GetPlayerState(playerid) != 1 && GetPlayerState(playerid) != 2 && GetPlayerState(playerid) != 3 && GetPlayerState(playerid) != 7)
	return SendClientMessage(playerid, COLOR_RED, "[Spawned]: You must be spawned, To use this command!");
	if(InP[playerid] >= 1) return SendClientMessage(playerid, COLOR_RED, "[Error]: You cannot use this command while in Parkour!");
	if(InDM[playerid] >= 1) return SendClientMessage(playerid, COLOR_RED, "[Error]: You cannot teleport, You're in DM!");
	if(pInfo[playerid][Jail] == 1) return SendClientMessage(playerid, COLOR_RED, "[Error]: You are in jail, You cannot teleport!");
	if(pInfo[playerid][Freeze] == 1) return SendClientMessage(playerid, COLOR_RED, "[Error]: You are frozen, Cannot use this command!");
	if(InHouse[playerid] == 1) return SendClientMessage(playerid, COLOR_RED, "[Error]: You are inside the House, Cannot teleport!");
	if(GetPlayerState(playerid) == PLAYER_STATE_PASSENGER) return SendClientMessage(playerid, COLOR_RED, "[Error]: You cannot teleport while in Passenger seat!");
	SetCameraBehindPlayer(playerid);
	if(IsPlayerInAnyVehicle(playerid))
	{
	    LinkVehicleToInterior(GetPlayerVehicleID(playerid), 0);
	    SetVehiclePos(GetPlayerVehicleID(playerid), 1308.8009,1318.5787,10.3858);
	    SetVehicleZAngle(GetPlayerVehicleID(playerid), 278.3416);
	}
	else
	{
	    SetPlayerInterior(playerid, 0);
	    SetPlayerPos(playerid, 1307.6665,1350.6819,10.8203);
	    SetPlayerFacingAngle(playerid, 344.3798);
	}
	format(str, sizeof(str), "[Teleport]: %s(%d) has teleport to Las Venturas Airport (/lva)", GetName(playerid), playerid);
	SendClientMessageToAll(COLOR_YELLOW, str);
	return 1;
}
Reply
#2

- You shouldn't have all of that underneath
Код:
public OnPlayerClickPlayer(playerid, clickedplayerid, source)
{
	return 1;
}
Reply
#3

Where should of i put them?
Reply
#4

For the warnings issue: You're creating variables that you're not using. Erase them and it should be fine. CTRL+F shall help you find them in the code.
Reply
#5

That means ill have to remove the cmds.
Reply
#6

use
#pragma unused aa
#pragma unused area69
#pragma unused chilliad
#pragma unused loop
#pragma unused lsa
#pragma unused lva
Reply
#7

I still get warnings
Reply
#8

Did you put them under OnPlayerCommandText? that would be wrong.
Put them anywhere in the script, and don't forget to #include <zcmd>
Reply
#9

thanks JimmyCh
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)