Gouki Posted June 13, 2022 Group: Members Topic Count: 88 Topics Per Day: 0.05 Content Count: 261 Reputation: 13 Joined: 08/12/20 Last Seen: November 21, 2024 Share Posted June 13, 2022 Hi guys, I tried truncating my mapreg and values are still not removed, this is check when you @set "$variable" in game. I tried checking the sql mapreg database also and it's empty, however there are values when checked in game. how do you delete this or wipe? Quote Link to comment Share on other sites More sharing options...
0 Start_ Posted June 13, 2022 Group: Members Topic Count: 26 Topics Per Day: 0.01 Content Count: 950 Reputation: 180 Joined: 04/05/13 Last Seen: Wednesday at 02:57 AM Share Posted June 13, 2022 (edited) Make sure there are no new variable got re-registered again on OnInit / OnPCLoginEvent. Edited June 13, 2022 by Start_ Quote Link to comment Share on other sites More sharing options...
0 Gouki Posted June 13, 2022 Group: Members Topic Count: 88 Topics Per Day: 0.05 Content Count: 261 Reputation: 13 Joined: 08/12/20 Last Seen: November 21, 2024 Author Share Posted June 13, 2022 Yes this specific variable is not triggered by oninit and onpcloginevent aswell. On 6/14/2022 at 8:59 AM, Tokei said: Long story short, you need to restart your server. As for why... that is due to how SQL data is used on the map-server. When the map-server starts, it reads all the variables in the mapreg table and loads them into memory. This way, when you want to access the variable in-game (when you use @set $variable), the value is easily accessible without having to look it up with your SQL server. This is done for various other features, like your character inventory, quests, achievements, player stats, etc. In either case, when you edit or delete the entry in SQL while it is still being loaded in memory, it will not have any impact in-game because that is not where the data is being read from. Doing so can actually cause issues as well if you're not careful. So you need to close your server, truncate the table, and then restart your server. Thank you for the perfect explanation, appreciate it @Tokei Quote Link to comment Share on other sites More sharing options...
1 Tokei Posted June 14, 2022 Group: Members Topic Count: 16 Topics Per Day: 0.00 Content Count: 697 Reputation: 724 Joined: 11/12/12 Last Seen: 4 hours ago Share Posted June 14, 2022 Long story short, you need to restart your server. As for why... that is due to how SQL data is used on the map-server. When the map-server starts, it reads all the variables in the mapreg table and loads them into memory. This way, when you want to access the variable in-game (when you use @set $variable), the value is easily accessible without having to look it up with your SQL server. This is done for various other features, like your character inventory, quests, achievements, player stats, etc. In either case, when you edit or delete the entry in SQL while it is still being loaded in memory, it will not have any impact in-game because that is not where the data is being read from. Doing so can actually cause issues as well if you're not careful. So you need to close your server, truncate the table, and then restart your server. 1 1 Quote Link to comment Share on other sites More sharing options...
Question
Gouki
Hi guys, I tried truncating my mapreg and values are still not removed, this is check when you @set "$variable" in game.
I tried checking the sql mapreg database also and it's empty, however there are values when checked in game. how do you delete this or wipe?
Link to comment
Share on other sites
3 answers to this question
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.