Progress2.inc warning
#1

hello.
today i will create progress bar.
So i download progressbar by [HLF]Southclaw
here https://sampforum.blast.hk/showthread.php?tid=537468

When i compile i got warning..
Код:
D:\FahLevY\PROJECT SERVER GUE !!!\Project Specially\Server Jadi!\COD\pawno\include\progress2.inc(152) : warning 205: redundant code: constant expression is zero
D:\FahLevY\PROJECT SERVER GUE !!!\Project Specially\Server Jadi!\COD\pawno\include\progress2.inc(240) : warning 205: redundant code: constant expression is zero
Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


2 Warnings.

This is the cooding of progress2.inc

here the code line 152
Код:
stock PlayerBar:CreatePlayerProgressBar(playerid, Float:x, Float:y, Float:width = 55.5, Float:height = 3.2, colour = 0xFF1C1CFF, Float:max = 100.0, direction = BAR_DIRECTION_RIGHT)
{
	if(!IsPlayerConnected(playerid)) ///// line 152
		return INVALID_PLAYER_BAR_ID;

	new barid = _bar_NewID(playerid);

	if(barid == -1)
	{
		print("[CreatePlayerProgressBar] ERROR: MAX_PLAYER_BARS limit reached.");
		return INVALID_PLAYER_BAR_ID;
	}
here the code line 240
Код:
_RenderBar(playerid, barid, update = false)
{
	if(!IsPlayerConnected(playerid))  ////line 240
		return false;

	if(!IsValidPlayerProgressBar(playerid, PlayerBar:barid))
		return false;

	PlayerTextDrawDestroy(playerid, pbar_TextDraw[playerid][barid][pbar_back]);
	PlayerTextDrawDestroy(playerid, pbar_TextDraw[playerid][barid][pbar_fill]);
	PlayerTextDrawDestroy(playerid, pbar_TextDraw[playerid][barid][pbar_main]);
Please help ,how to fix that ..
thank you
Reply
#2

somebody help please ...
Reply
#3

guys?? help please
Reply
#4

so what the problem,i was updated the ut_mock_players.inc .its still same problem, got 2 warning..
Reply
#5

Quote:

stock PlayerBar:CreatePlayerProgressBar(playerid, Float, Float:y, Float:width = 55.5, Float:height = 3.2, colour = 0xFF1C1CFF, Float:max = 100.0, direction = BAR_DIRECTION_RIGHT)
{

new barid = _bar_NewID(playerid);

if(barid == -1)
{
print("[CreatePlayerProgressBar] ERROR: MAX_PLAYER_BARS limit reached.");
return INVALID_PLAYER_BAR_ID;
}

Quote:

_RenderBar(playerid, barid, update = false)
{

if(!IsValidPlayerProgressBar(playerid, PlayerBar:barid))
return false;

PlayerTextDrawDestroy(playerid, pbar_TextDraw[playerid][barid][pbar_back]);
PlayerTextDrawDestroy(playerid, pbar_TextDraw[playerid][barid][pbar_fill]);
PlayerTextDrawDestroy(playerid, pbar_TextDraw[playerid][barid][pbar_main]);

fixed
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)