View Single Post
Old 11/06/2019, 03:54 PM   #2
Plastikmensch
Huge Clucker
 
Join Date: Aug 2016
Posts: 239
Reputation: 13
Default Re: Price or item does not update

So, what happens there is that
Code:
if(PlayerCache_GetFree(playerid))
is always true if return value is not 0.
You can confirm that by doing this in OnGameModeInit:
Code:
new test = -1;
if(test) print("test true");
//will print "test true" into console.
You should check for the return value if not 0 or 1:
Code:
if(PlayerCache_GetFree(playerid)!=-1)

Last edited by Plastikmensch; 11/06/2019 at 03:54 PM. Reason: fixed typo
Plastikmensch is offline   Reply With Quote