GERgta Posted May 28, 2015 Share Posted May 28, 2015 (edited) Hello people I've been trying to reset account data for a system I wrote to save the player's weapons, however; I can not find a way to delete account data that I've set. I've tried setAccountData(acc,"key",false) and setAccountData(acc,"key",nil), but nothing seems to work I get no errors and the the account that I used exists. Any help? Edited May 28, 2015 by Guest Link to comment
ALw7sH Posted May 28, 2015 Share Posted May 28, 2015 setAccountData(acc,"key",false) Should work, if it's not then that's your saving system problem Link to comment
GERgta Posted May 28, 2015 Author Share Posted May 28, 2015 Okay, I will try again. EDIT: *giant facepalm* I had a "if" event there that broke everything. Thanks everyone, sorry for wasting your time Link to comment
The_Walrus Posted May 28, 2015 Share Posted May 28, 2015 It might still be a better idea to use "nil" instead of "false" as false is technically the value 0 while "nil" allow you to allocate that space for other stuff in your memory, and your server hard disks. On a small server we're talking about a few bits of space, (even on larger servers it might not even be noticeable, at least not in the beginnig but later on you might get a database filled with the value "false"). Therefore it's a good idea to set the account data to "nil", if you want to truly reset it. Link to comment
ALw7sH Posted May 28, 2015 Share Posted May 28, 2015 The_Walrus said: It might still be a better idea to use "nil" instead of "false" as false is technically the value 0 while "nil" allow you to allocate that space for other stuff in your memory, and your server hard disks. On a small server we're talking about a few bits of space, (even on larger servers it might not even be noticeable, at least not in the beginnig but later on you might get a database filled with the value "false"). Therefore it's a good idea to set the account data to "nil", if you want to truly reset it. That is extremely true, even with variables Especially if you aspire to have server with 100+ players without lag that small thing may case lag with alot players, who know Link to comment
GERgta Posted June 16, 2015 Author Share Posted June 16, 2015 Thanks for all the info, guys Link to comment
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now