Why are the Python Docs for Server Side Extensions so Lacking...Please Fix

Post here your questions about Actionscript and Java server side extensions development.

Moderators: Lapo, Bax

Posts: 4
Joined: 15 Apr 2020, 00:59

Why are the Python Docs for Server Side Extensions so Lacking...Please Fix

Postby lazybearsoft » 01 Oct 2020, 00:50

I have been developing using Smartfox for months now, using both Python and AS extensions, and this has caused me no end of hassle.

Case in point, look up Zone.getRooms() in AS in the AS docs. Now try to do the same for Python. Oh, it's not there? What's worse, only the _server class is documented for python, you're apparently SOL if you want to get info about room, zone, etc methods for Python. And please don't tell me the AS docs are similar enough to be used for python: take a look at _server.createRoom() for both AS and Python....they don't even have the same number of parameters.

For the love of God, if full python docs actually exist somewhere, please let me know where to find them.....otherwise, someone at SmartFox please fill in the HUGE gaps in python docs. If you're not going to fully support python with complete documentation, then you should remove python support altogether, so that new devs dont make the mistake of starting with Python, then realizing later down the road (like I did) that SmartFox is treating python like the red-headed step-child, at least as far as documentation is concerned.

EDIT: after drilling down on the AS docs, I just noticed that although the Zone methods are listed, there is NO detail (parameters, return values). C'mon guys, your smattering of example extensions is not a good excuse to skimp on the documentation.
User avatar
Site Admin
Posts: 21791
Joined: 21 Mar 2005, 09:50
Location: Italy

Re: Why are the Python Docs for Server Side Extensions so Lacking...Please Fix

Postby Lapo » 01 Oct 2020, 08:38

I am assuming you haven't seen this?
https://www.smartfoxserver.com/docs/1x/ ... index.html

The Python docs is linked in the main SFS 1.x docs here:

Section 7, where all server side APIs are documented.

...addicted to flash games
Posts: 4
Joined: 15 Apr 2020, 00:59

Re: Why are the Python Docs for Server Side Extensions so Lacking...Please Fix

Postby lazybearsoft » 02 Oct 2020, 05:50

Thank you for the response. Yes, the python docs you referred to in your link is exactly what I'm talking about. I have seen them...and they only contain the _server class info. Where are all the other necessary python docs for Zone and Room and possibly other classes? For instance, the actionscript docs for server-side zones is here: https://www.smartfoxserver.com/docs/1x/ ... s/Zone.htm Where is the python equivalent?

Furthermore, while your _server class docs is fine, your other class docs is not really complete, even for actionscript. For example, here is your doc page for _server.joinRoom(), which is indeed decent documentation:



SmartFoxServer PRO 1.4.0


_server.joinRoom(user, currRoomId, leaveRoom, newRoom, pwd, isSpec, sendUpdate)


Joins a user into a room from the server side.


user The user to join
currRoomId the id of the current room where the user is already joined (-1 if he's not already joined)
leaveRoom a boolean flag. If true the user will leave the current room after joining the new one
newRoom the id of the new room to join
pwd a password, if needed to join the room
isSpec a boolean flag. If true the user will join in the new room as a spectator (game rooms only)
sendUpdate a boolean flag. Default = true. It will send the default update to all the other clients (optional)

A boolean. True if the join was successful


var ok = _server.joinRoom(userObj, currId, true, newId)
if (ok)


Note the complete documentation of each parameter, and even a small example, which is great. Now compare this with your docs for the Zone methods:

Zone class


SmartFoxServer PRO 1.2.1


A Zone object represents one zone / application running in the server.
Here follows a list of public methods for this object.

Public Methods:

addBuddy(who, buddyName) Adds a buddy (buddyName) to the user (who) buddy list
checkBuddy(buddyName) Checks if a buddy (buddyName) is logged in the current Zone. Returns a boolean
clearBuddyList(who) who = user name of the client. Clears the user's buddy list.
getAutoJoinRoom() Return the ID of the room set as autoJoin in the current Zone
getEmptyNames() Return true if the "EmptyNames" options is turned on for the current Zone
getCountUpdate() Return true if the "uCountUpdate" options is turned on for the current Zone
getMaxRooms() Return the max number of rooms available for the current Zone
getMaxUsers() Return the max number of users available for the current Zone
getName() Return the name of the current Zone
getRoom(roomId) Return the Room object from its ID
getRoomByName(roomName) Return the Room object from its name
getRoomCount() Return the current number of rooms in the Zone
getRooms() Return a list of Room objects available in the Zone
getStatus() Return true if the current Zone is active
getUserCount() Return the current number of users in the Zone
getUserList() Return a java.util.List containing all the users logged in that Zone
hasBuddyList() Return true if the current Zone has the buddyList support turned on
removeBuddy(who, buddyName) Removes a buddy (buddyName) from a user (who) buddy list
setPubMsgInternalEvent(flag) If set to true an internal event will be fired each time a public message is received by the server. It can be useful for logging public messages.
By defualt the flag is set to false


You don't break down each method in a separate page , giving complete info on each parameter and an example like you did with the _server class, which is too bad because it would be very helpful. I can't tell you how many times I've wanted to to do a certain thing in python and not being able to find the documentation....so then I end up spending an hour searching the forums, or the very few python example extensions, for an example of what I want to do, sometimes finding an answer, sometimes not. All I'm saying is, if all your classes and methods were as well documented as your _server classes/methods are, in ALL languages your extensions support, I would be a heck of a lot more productive doing SmartFox development.

Return to “Server Side Extension Development”

Who is online

Users browsing this forum: No registered users and 14 guests