SA-MP Forums Archive
Symbol not being given a value - 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)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: Symbol not being given a value (/showthread.php?tid=94457)



Symbol not being given a value - ilikepie2221 - 30.08.2009

pawn Код:
new Rank;
Rank = dini_Int("DMVInfo.ini", NameString);
Rank = gDMVPlayerInfo[playerid][PLAYER_IN_DMV]; // 119
Код:
C:\Users\Family\Desktop\()\SAMP server shit\filterscripts\CarSchool.pwn(119) : warning 204: symbol is assigned a value that is never used: "Rank"
Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


1 Warning.
The reason I did this is because I'd rather not use a switch for this.


Re: Symbol not being given a value - ilikepie2221 - 30.08.2009

12 hr bump


Re: Symbol not being given a value - James_Alex - 30.08.2009

cuz you haven't used the "Rank" in anywhere else


Re: Symbol not being given a value - ilikepie2221 - 30.08.2009

But would this code make whatever dini_Int returns equal to gDMVPlayerInfp[playerid][PLAYER_IN_DMV]?


Re: Symbol not being given a value - ilikepie2221 - 31.08.2009

12 hr bump


Re: Symbol not being given a value - Clavius - 31.08.2009

Quote:
Originally Posted by ilikepie2221
But would this code make whatever dini_Int returns equal to gDMVPlayerInfp[playerid][PLAYER_IN_DMV]?
No you use the wrong order, you need to assing the value of 'Rank' to 'gDMVPlayerInfo[playerid][PLAYER_IN_DMV]' not vice versa.
pawn Код:
gDMVPlayerInfo[playerid][PLAYER_IN_DMV] = Rank;
Now 'Rank' is used, so the warning will go away too!