x86 Posted January 30, 2009 Share Posted January 30, 2009 Hi, I'm creating a login system with addAccount functions. It works fine, but if i restart server, accounts.xml is: <accounts> <autologin>0</autologin> <account name="Console" password=""/> </accounts> Thank you. Link to comment
50p Posted January 30, 2009 Share Posted January 30, 2009 That is usual behaviour when you use setAccountData in DP2.x Link to comment
x86 Posted January 30, 2009 Author Share Posted January 30, 2009 That is usual behaviour when you use setAccountData in DP2.x Yes, i use that function, do you know how can fix it ? Link to comment
Lordy Posted January 30, 2009 Share Posted January 30, 2009 Yea, use a nightly for example Link to comment
x86 Posted January 30, 2009 Author Share Posted January 30, 2009 Yea, use a nightly for example Hmm, so another reason.. i must wait till mta 1.0 Link to comment
Gamesnert Posted January 30, 2009 Share Posted January 30, 2009 That is usual behaviour when you use setAccountData in DP2.x Yes, i use that function, do you know how can fix it ? You can temporarily fix it by using XML or SQL. But overall, it's better to use setAccountData. (if it works. If it doesn't, like in this case, use something else or nothing instead) Link to comment
robhol Posted January 30, 2009 Share Posted January 30, 2009 That is usual behaviour when you use setAccountData in DP2.x Yes, i use that function, do you know how can fix it ? You can temporarily fix it by using XML or SQL. But overall, it's better to use setAccountData. (if it works. If it doesn't, like in this case, use something else or nothing instead) AccountData functions = xml, so whether or not it's "better" isn't really set in stone. But account data is pretty much just a one-dimensional associative array: it has a key you can use to find/read/write data. Both XML and SQL functions are easier to customize, more flexible, and SQL is IIRC faster than XML (and thus, acc data) with more data. More than anything, I'd say it depends a lot on total player volume in the server. If you get like 5000 different registrations at some point, using XML for it all is going to be a bitch. Link to comment
x86 Posted January 31, 2009 Author Share Posted January 31, 2009 That is usual behaviour when you use setAccountData in DP2.x Yes, i use that function, do you know how can fix it ? You can temporarily fix it by using XML or SQL. But overall, it's better to use setAccountData. (if it works. If it doesn't, like in this case, use something else or nothing instead) My old version of greenhood was MTA-MySQL, but sometimes it lags Link to comment
robhol Posted January 31, 2009 Share Posted January 31, 2009 SQLite, while not perfect, is the best way of using SQL to store data in dp2. You can find the functions on the wiki. Link to comment
x86 Posted January 31, 2009 Author Share Posted January 31, 2009 SQLite, while not perfect, is the best way of using SQL to store data in dp2.You can find the functions on the wiki. http://development.mtasa.com/index.php? ... eSQLSelect these you mean ? EDIT: Hm, i can better work with MySQL.. results is better with fetch_assoc.. Link to comment
robhol Posted January 31, 2009 Share Posted January 31, 2009 SQLite, while not perfect, is the best way of using SQL to store data in dp2.You can find the functions on the wiki. http://development.mtasa.com/index.php? ... eSQLSelect these you mean ? EDIT: Hm, i can better work with MySQL.. results is better with fetch_assoc.. No... you just need to think a little bit more. Looking at the examples much? Besides, the sql functions don't regularly crash your servers, IIRC. 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