Epic Warning
#1

Hello everybody.I got epic warning but i dont know how to fix them
Code:
pawn Код:
//top of script
new area;
new abb;

//OnGameModeInit
area = CreatePickup(1239, 2, 378.0938,1973.1765,17.6575, 0);
abb = CreatePickup(1239, 2, 364.6389,2529.2292,16.6683, 0);
warning
Код:
C:\Documents and Settings\Korisnik\My Documents\Downloads\samp03dsvr_win32(1)\gamemodes\SpiderWalk.pwn(152) : warning 204: symbol is assigned a value that is never used: "abb"
C:\Documents and Settings\Korisnik\My Documents\Downloads\samp03dsvr_win32(1)\gamemodes\SpiderWalk.pwn(151) : warning 204: symbol is assigned a value that is never used: "area"
Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


2 Warnings.
Reply
#2

Place this under OnGamemodeExit

Код:
DestroyPickup(area);
DestroyPickup(abb);
Reply
#3

What are you going to do with those pickups? You should use it as so:
pawn Код:
public OnPlayerPickUpPickup(playerid, pickupid)
{
    if(pickupid == area) print("Area pickup.");
    else if(pickupid == abb) Ban(playerid);

    return 1;
}
If you won't use the pickups for anything, just don't make those variables, which will be a waste.
Reply
#4

Quote:
Originally Posted by [L3th4l]
Посмотреть сообщение
What are you going to do with those pickups? You should use it as so:
pawn Код:
public OnPlayerPickUpPickup(playerid, pickupid)
{
    if(pickupid == area) print("Area pickup.");
    else if(pickupid == abb) Ban(playerid);

    return 1;
}
If you won't use the pickups for anything, just don't make those variables, which will be a waste.
Thanks for all replys
Reply
#5

If you're not going to use them (but still want to assign them to variables - though I don't know why you'd do that!) you could just use the #pragma unused directive.

pawn Код:
#pragma unused symbol
Replace "symbol" with the variable name.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)