BigBrother Posted September 24, 2013 Share Posted September 24, 2013 Hello, I'm starting a new roleplay gamemode, and I'd like to optimize it. I don't want to make SQL requests at each time I have to change a user data, so I had the idea to create a table at the connection of the user, and to store in it all the informations which could be changes during the game session. At the logout, I just have to make a request to update all the content of the table in the SQL table But, using this method requires to create a table for each connected player, so How can I create dynamicly a table ? Regards, Link to comment
Moderators IIYAMA Posted September 24, 2013 Moderators Share Posted September 24, 2013 myTable = {} myTable[player] = {} Link to comment
Tete omar Posted September 24, 2013 Share Posted September 24, 2013 Or read lua tables tutorial: http://lua-users.org/wiki/TablesTutorial 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