SA-MP Forums Archive
why am I getting this warning? - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: why am I getting this warning? (/showthread.php?tid=463986)



why am I getting this warning? - ExtendedCarbon - 14.09.2013

My code
Код:
//on top of script
new matrunpickup;

//under ongamemodeinit
matrunpickup = CreatePickup(1239, 1, 1424.0276, -1319.5800, 13.5547, 0);
Getting this warning
C:\Users\----\Desktop\------\--------- : warning 204: symbol is assigned a value that is never used: "matrunpickup"
Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase


1 Warning.


Re: why am I getting this warning? - SeniorGamer - 14.09.2013

Well u need to assign it to something like.


if(matrunpickup(playerid) == 1)


Re: why am I getting this warning? - ExtendedCarbon - 14.09.2013

I put
if (pickupid = matrunpickup)
{
GameTextForPlayer(playerid, "/getmats", 3000, 3);
}

Now I'm getting
warning 211: possibly unintended assignment


Re: why am I getting this warning? - Dragonsaurus - 14.09.2013

pawn Код:
if(pickupid == matrunpickup)  // You need two "=" symbols.



Re: why am I getting this warning? - ExtendedCarbon - 14.09.2013

Quote:
Originally Posted by Dragonsaurus
Посмотреть сообщение
pawn Код:
if(pickupid == matrunpickup)  // You need two "=" symbols.
Ah thanks