Guest
Mar 11, 2010, 7:52 am UTCHome arrow Ramblings arrow Interesting Bug Fix
header image
Interesting Bug Fix
Written by Dreamless Dancer   
Mar 08, 2008 at 07:20 AM

This is a minor update in which while the main focus of the update was to permit the ability to "recurse" procedures, that is, you can have procedures call other procedures, just not have any procedure call a calling procedure, it also address's a couple of bugs in the code.

For example, a gift will either shut the bot down, render it unable to reconnect, or crash, depending on when and how it saw the gift.

The portrait select command was not permitting the user to enter a value for which portrait they wanted.

And a Furcadia installation where the settings was not in an expected default location would cause the bot to fail in making a proper connection.

First off, lets address the settings issue.

Furbot, in order to connect, requires the Furcadia client to connect to it, at which point the bot will then connect to the server. If the client never connects to the bot, the bot never connects to the server. It will sit there all night and just, wait. Meanwhile, the client, failing to connect to the bot, may bypass the bot, and connect to the server, leading to a state of confusion where you'd think the darn thing connected. Nope.

trffc10cWhen the bot is in a disconnected state, this is the icon that shows in the notification area, (which is misnamed the "Tray").

trffc10bThen we have the state where the bot is waiting for the client to establish connection with the bot, bot will not proceed past this point until the client connects, at which time the bot attempts to connect with the game server. It does nothing to actually login to the server, it relies on the client to login.

trffc10aAnd finally, we're green for go, the bot has not only gotten the client, but has successfully connected with the server, you are officially able to use the bot as a proxy.

Now for the mumbo jumbo on what the program does when starting up. The first place the program looks is the "official" location for settings file as it would be installed default on a computer, this is generally under the user's local application data folder. If it fails to find the folder, or finds the folder but does not find the file, the program falls back to old school and looks in the Program Files folder for Furcadia. And this is the bug fix.

Prior to this release, I was assuming that settings would exist in the program folder if it was not in the application data folder. Now, I don't, the program checks for the existance of the file, and if not found, sets up a situation where you can edit in a correction to the program's configuration file. If the file was not found in the preferred folder, furbot will default to using it's own folder to hold the it's configuration file. If it doesn't exist, restart the program, change a setting, close the program. You can now open the file, (furbotwx.ini), in notepad, and edit the line which starts off with cfgSettingsFolder= and put in the path to your settings, with a trailing slash. Very important to do that. Now, upon restarting the program, it should, upon failing to locate the settings file, read that in and use that folder to locate the file, and be able to function.

This process is semi self correcting, if it should ever find the settings in the preferred location, it will default to using that, so if you have a settings file in one of the preferred locations, this fix will fail, and reset the configuration to using that.

gapperThe other fix involves procedures. Initially, in constructing the program, I limited the ability of procedures to be nested one deep, that is, you could only call upon one procedure from a triggered command. Now I have something more of a stack in the system which will allow up to ten procedure calls within a command execution with up to three procedures deep in the calls. You just can't call a procedure within itself, nor have another procedure call a calling procedure, too much danger of infinate loops or setups where you will crash something and be rather annoyed at the three finger salute to be rid of the non-responsive program. Thank you no, enough of you get annoyed with me just for making a bot. Suprise

Current on the front burner project is convincing the bot to safely interface with a website and be able to post / get information from it.

Last Updated ( Mar 08, 2008 at 08:21 AM )
<Previous   Next>
header image