pro db extention example problem

Need help with SmartFoxServer? You didn't find an answer in our documentation? Please, post your questions here!

Moderators: Lapo, Bax

User avatar
zachofthegolden1
Posts: 89
Joined: 05 Sep 2011, 19:31

pro db extention example problem

Postby zachofthegolden1 » 13 Dec 2011, 21:14

everytime i click the load from database i get this in the cmd box


17:04:04.375 - [ INFO ] > [RedBox] Internal event received: serverReady
17:04:04.375 - [ INFO ] > [RedBox] Internal event received: serverReady
17:04:04.375 - [ INFO ] > [RedBox] Internal event received: serverReady
[dbExtension.as]: Event received: userJoin
[simpleExt.as]: Event received: userJoin
17:05:04.103 - [ WARNING ] > it.gotoandplay.smartfoxserver.exceptions.MissingExt
ensionException: Unrecognized extension name: [ dbTest ]! Zone: dbZone, Room: 21
-ZG1
User avatar
Bax
Site Admin
Posts: 4609
Joined: 29 Mar 2005, 09:50
Location: Italy
Contact:

Postby Bax » 14 Dec 2011, 15:33

What does it mean "click the load from database"???
Paolo Bax
The SmartFoxServer Team
User avatar
zachofthegolden1
Posts: 89
Joined: 05 Sep 2011, 19:31

Postby zachofthegolden1 » 14 Dec 2011, 23:20

On the pro db xtention when i click on load from db.
-ZG1
User avatar
rjgtav
Posts: 2813
Joined: 19 Apr 2009, 11:31
Location: Lisbon, Portugal

Postby rjgtav » 15 Dec 2011, 18:31

Please make sure that the dbExtension.as extension is loaded correctly. You can check this by checking the server logs
Skills: SFS Pro, SFS2X, AS2.0/AS3.0, Java, HTML5/CSS3/JS, C#
Portfolio: https://rjgtav.wordpress.com/
SFS Tutorials: http://sfs-tutor.blogspot.com/ - Discontinued. Some examples may be bugged.
User avatar
zachofthegolden1
Posts: 89
Joined: 05 Sep 2011, 19:31

Postby zachofthegolden1 » 16 Dec 2011, 00:12

i keep seeing

01:12:20.185 - [ SEVERE ] > DbManager error during command execution: INSERT INT
O contacts (id, name, location, email) VALUES ('1323997940183', 's', 's', 's')
com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: Unknown column 'id' i
n 'field list'

EDIT

Foxed the problem, just having isues with the avatar not showing and room list not being updated
-ZG1
User avatar
zachofthegolden1
Posts: 89
Joined: 05 Sep 2011, 19:31

Postby zachofthegolden1 » 18 Dec 2011, 06:33

UPDATE

Got it working. just having trouble with making regester acounts and having problems with chat bouble not showing but in chat log the text come up

also Rjgtav can i please have a source file of the Database register please? because im having big problems making it work on my game. I'm using smartfox server pro
-ZG1
User avatar
rjgtav
Posts: 2813
Joined: 19 Apr 2009, 11:31
Location: Lisbon, Portugal

Postby rjgtav » 19 Dec 2011, 18:42

Hi. Well, the whole source of the extension is on the post. The only bug there is in the line:

function handleInternalEvent(evt){ //not used }

And the fix is:

function handleInternalEvent(evt){};//not used
Skills: SFS Pro, SFS2X, AS2.0/AS3.0, Java, HTML5/CSS3/JS, C#
Portfolio: https://rjgtav.wordpress.com/
SFS Tutorials: http://sfs-tutor.blogspot.com/ - Discontinued. Some examples may be bugged.
User avatar
zachofthegolden1
Posts: 89
Joined: 05 Sep 2011, 19:31

Postby zachofthegolden1 » 19 Dec 2011, 20:35

it just says connecting... doesent do anything else can i please have a sourse file? im dispraxic so loads of text confuses me
-ZG1
User avatar
rjgtav
Posts: 2813
Joined: 19 Apr 2009, 11:31
Location: Lisbon, Portugal

Postby rjgtav » 19 Dec 2011, 21:35

That doesn't have nothing to do with the extension... Sorry but i lost my hdd and no longer have the source...

But is the example at least connecting to the server?
Skills: SFS Pro, SFS2X, AS2.0/AS3.0, Java, HTML5/CSS3/JS, C#
Portfolio: https://rjgtav.wordpress.com/
SFS Tutorials: http://sfs-tutor.blogspot.com/ - Discontinued. Some examples may be bugged.
User avatar
zachofthegolden1
Posts: 89
Joined: 05 Sep 2011, 19:31

Postby zachofthegolden1 » 19 Dec 2011, 21:39

i add the coding in and when i press on regester in the regester window the text says connecting.... nothing happens after that
-ZG1
User avatar
rjgtav
Posts: 2813
Joined: 19 Apr 2009, 11:31
Location: Lisbon, Portugal

Postby rjgtav » 19 Dec 2011, 21:42

Ok but i can't check the example now as i no longer have it. Can you please debug it by yourself? Add some traces in the connect event, turn on the smartfox.debug flag, etc.

Probably the application isn't connecting... if so, there is some probem reaching the server... Is the server running on the same pc as the example? And has the server started correctly with no errors?
Skills: SFS Pro, SFS2X, AS2.0/AS3.0, Java, HTML5/CSS3/JS, C#
Portfolio: https://rjgtav.wordpress.com/
SFS Tutorials: http://sfs-tutor.blogspot.com/ - Discontinued. Some examples may be bugged.
User avatar
zachofthegolden1
Posts: 89
Joined: 05 Sep 2011, 19:31

Postby zachofthegolden1 » 19 Dec 2011, 21:50

server running fine also is there another way i could make an account register just basically adds username password email or is that the only way? sorry if im annoying im new to this. docs say nothing abut creating accounts
-ZG1
User avatar
rjgtav
Posts: 2813
Joined: 19 Apr 2009, 11:31
Location: Lisbon, Portugal

Postby rjgtav » 19 Dec 2011, 22:41

The docs say nothing about creating new accounts because that's out of the scope of the Server's core. Registering accounts in SFS is the same as registering accounts in MySQL (the SQL code is the same), so you may probably want to look for SQL codes regarding registering accounts.

Then, to execute those SQL codes, you can check the DB related examples, as they run various queries and updates to a database
Skills: SFS Pro, SFS2X, AS2.0/AS3.0, Java, HTML5/CSS3/JS, C#
Portfolio: https://rjgtav.wordpress.com/
SFS Tutorials: http://sfs-tutor.blogspot.com/ - Discontinued. Some examples may be bugged.

Return to “SmartFoxServer 1.x Discussions and Help”

Who is online

Users browsing this forum: Google [Bot] and 60 guests