Follow along with the video below to see how to install our site as a web app on your home screen.
Note: This feature may not be available in some browsers.
There is NO official Otland's Discord server and NO official Otland's server list. The Otland's Staff does not manage any Discord server or server list. Moderators or administrator of any Discord server or server lists have NO connection to the Otland's Staff. Do not get scammed!
If you are asking for help you should at least try to explain the problem you're facing. Simply stating that it "doesn't work" isn't helpful at all.
Both the Game.getStorageValue and Game.setStorageValue are defined in the data\lib\core\game.lua file. However the values you set with them are not persistent, meaning they will disappear whenever the server is closed.
From what you mentioned, I assume you're getting the following error: "attempt to perform arithmetic on nil value". If non-persistent values are fine by you, all you have to do to fix the error above is slightly change your code to this:
Code:
Game.setStorageValue(PACC_STORAGE, (Game.getStorageValue(PACC_STORAGE) or 0) + 1)
On the other hand, if you need a way to save values in a persistent fashion, I can propose two other solutions to achieve that: create a table on your database and use sql queries, or directly save the value on a file in your computer. Let me know if you need further help with this.