Hello.
I am making a virtual world. I have a login database with a login extension. I have a row called level and the default value is 1. In my virtual world file, there is a text with an instance name. Is it possible to send the data from the database from the level row to the text? Would I have to add something to the extension? Thanks.
Levels
-
- Posts: 148
- Joined: 03 Aug 2010, 16:08
- Contact:
There's _server.writeFile method which can be used to write the data retrieved from the database to a file.
See http://www.smartfoxserver.com/docs/docPages/serverSideApi/_server/writeFile.htm
See http://www.smartfoxserver.com/docs/docPages/serverSideApi/_server/writeFile.htm
Smartfox's forum is my daily newspaper.
-
- Posts: 148
- Joined: 03 Aug 2010, 16:08
- Contact:
-
- Posts: 148
- Joined: 03 Aug 2010, 16:08
- Contact:
1. I want the user to login
2. I want the text file to load the user's level from the level row in my H2 database.
3. A text on the chat bar displays what level they are. If they complete a certain quest, the level goes up.
4. The new level is stored in the database, so that the next time the user logs in, their level is the same as when they were logged in the last time.
If I am not explaining this clearly, please tell me.
2. I want the text file to load the user's level from the level row in my H2 database.
3. A text on the chat bar displays what level they are. If they complete a certain quest, the level goes up.
4. The new level is stored in the database, so that the next time the user logs in, their level is the same as when they were logged in the last time.
If I am not explaining this clearly, please tell me.
Okay, I guess by 'text file' you're referring to the server-side extension.
To do this, you'll need to enable 'custom login' for your zone to be able to handle your own login logic. See http://www.smartfoxserver.com/docs/docPages/tutorials_pro/05_loginExt/index.htm for more on custom login.
As for loading the data from the database, please refer to http://www.smartfoxserver.com/docs/docPages/tutorials_pro/03_dbExt/index.htm%20and and http://www.smartfoxserver.com/docs/docPages/tutorials_pro/19_h2database/index.htm
Then once you have loaded the data, you can then send it to the client after successful login.
Chat bar is for you to figure out.
To do this, you'll need to enable 'custom login' for your zone to be able to handle your own login logic. See http://www.smartfoxserver.com/docs/docPages/tutorials_pro/05_loginExt/index.htm for more on custom login.
As for loading the data from the database, please refer to http://www.smartfoxserver.com/docs/docPages/tutorials_pro/03_dbExt/index.htm%20and and http://www.smartfoxserver.com/docs/docPages/tutorials_pro/19_h2database/index.htm
Then once you have loaded the data, you can then send it to the client after successful login.
Chat bar is for you to figure out.
Smartfox's forum is my daily newspaper.
Return to “SmartFoxServer 1.x Discussions and Help”
Who is online
Users browsing this forum: No registered users and 89 guests