[SOLVED] nVault Problem
PHP Code:
For some reason, even if there is no vault data beforehand, the player always has all cells in Achievement_Progress for all achievements set to 16. Any ideas? |
Re: nVault Problem
Not sure, though you could reduce this:
PHP Code:
PHP Code:
|
Re: nVault Problem
Quote:
Hmm just realized I've been doing that in the whole plugin. Thanks for the optimization :) I have no idea why it's automatically starting at 16. I stop the server, delete the vault file, and then restart it, and when I first create an achievement, I logged it to be equal to 0, but then when I join the server, it gets set to 16. |
Re: nVault Problem
16 is a weird number, considering you have no constant integers (as far as I can see) being assigned in the code shown. Perhaps the issue is coming from another bit.
What is the value of g_iTotalAchievements? Does the server you're testing it on have a maximum of 16 slots (get_maxplayers())? |
Re: nVault Problem
Yes the server has 16 slots.
The value of g_iTotalAchievements is 15. But none of those numbers are related, because I just tested it again, and now the number is 84.. |
Re: nVault Problem
Seemed to have fixed it by using nvault_lookup instead of nvault_get and checking if they key existed beforehand, and if it didn't, then I would set it to 0.
|
| All times are GMT -4. The time now is 00:47. |
Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.