3 warning appear when i compile the gm
#1

this is the warning:

C:\Documents and Settings\Sorin\Desktop\Servere Sa-mp™\Server\pawno\include\streamer.inc(487) : warning 219: local variable "hitid" shadows a variable at a preceding level
C:\Documents and Settings\Sorin\Desktop\Servere Sa-mp™\Server\gamemodes\RolePlay.pwn(4354) : warning 209: function "Streamer_OnPlayerDisconnect" should return a value
C:\Documents and Settings\Sorin\Desktop\Servere Sa-mp™\Server\gamemodes\RolePlay.pwn(65134) : warning 203: symbol is never used: "GetPointDistanceToPointExMorph"
Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase

Header size: 11260 bytes
Code size: 2995512 bytes
Data size: 14322904 bytes
Stack/heap size: 16384 bytes; estimated max. usage=4213 cells (16852 bytes)
Total requirements:17346060 bytes

3 Warnings.

And this the lines:

487: public OnPlayerWeaponShot(playerid, weaponid, hittype, hitid, Float:fX, Float:fY, Float:fZ)
{
if (hittype == BULLET_HIT_TYPE_PLAYER_OBJECT)
{
Streamer_CallbackHook(STREAMER_OPWS, playerid, weaponid, hittype, hitid, fX, fY, fZ);
}
#if defined Streamer_OnPlayerWeaponShot
return Streamer_OnPlayerWeaponShot(playerid, weaponid, hittype, hitid, fX, fY, fZ);
#else
return 1;
#endif
}


if(PlayerInfo[playerid][pJob] == 11)
{
if(JobDuty[playerid] == 1) { Medics -= 1; }
}
else if(PlayerInfo[playerid][pJob] == 7)
{
if(JobDuty[playerid] == 1) { Mechanics -= 1; }
}
else if(PlayerInfo[playerid][pJob] == 17)
{
if(JobDuty[playerid] == 1) { PizzaBoys -= 1; }
}
if (PlayerInfo[playerid][pRoadblock] != 0)
{
RemoveRoadblock(playerid);
}
BusrouteEast[playerid][0] = 0;
BusrouteWest[playerid][0] = 0;
TextDrawHideForPlayer(playerid,lbt);
TextDrawHideForPlayer(playerid,lbb);
TextDrawDestroy(Textdraw42[playerid]);
TextDrawDestroy(Textdraw41[playerid]);
ttroute[playerid] = 0;
} <- (line 4354)
Reply
#2

- You declared hitid as a global variable and it conflicts. Re-name the variable to some other name.
- At the end of OnPlayerDisconnect callback, return a value.
pawn Код:
public OnPlayerDisconnect(playerid, reason)
{
    // code..
    return 1; // <--
}
- You don't use GetPointDistanceToPointExMorph function anywhere. You can either ignore it (it won't cause any problems) or add the stock keyword before.
Reply
#3

I'll try this
Reply
#4

Solved,Thanks! you recive +1 rep at me
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)