Duke n Dave 2 Posted June 3, 2010 Report Share Posted June 3, 2010 Hey Ubotters, I am a bit new and already have been helped out quite a bit by this forum thanks to you all! I wanted to share something that might be obvious, but is good information for noobs... I usually use this to debug my code... I read about creating error reports and all that stuff which is really the best way to go about debugging code.. but this is simple and easy to implement and can give you an idea of whats going on within the code.. I always like to create a "UI stat monitor" that tracks the variable "#status" or whatever you want to name it... Then throughout my code I use the "set" option to reset the "#status" variable to whatever is currently going on in the code.. Here is a sample: Once again this is not the best way by any means, but I hope this can help someone! PS - If you dont have delays and are moving fast through the bot sometimes the label might not change.. just my experience.. duken dave 2 Quote Link to post Share on other sites
UBotBuddy 331 Posted June 3, 2010 Report Share Posted June 3, 2010 Great idea! Quote Link to post Share on other sites
cervant41 2 Posted June 4, 2010 Report Share Posted June 4, 2010 Awesome idea Quote Link to post Share on other sites
Luke 18 Posted June 4, 2010 Report Share Posted June 4, 2010 Very nice! It can really give your endusers an idea what's happening and what the bot is 'thinking' at any given moment. I love it. Will use soon!Luke Quote Link to post Share on other sites
alcr 135 Posted June 4, 2010 Report Share Posted June 4, 2010 Loving it already! I should open up a new forumsection just for training material and tips like this right away! Quote Link to post Share on other sites
UBotBuddy 331 Posted June 4, 2010 Report Share Posted June 4, 2010 Here is something else that I do. I create a sub and I place all of my "UI Stat Monitors" in it. The cool part is that you do not need to Call the sub because that UI will continue showing your results. But once I get a bot completed I copy it to a new ".ubot" file and I delete the Sub. Compile and go. I don't have to go searching for those UI that I don't want the user to see. Of course it would be nice to have a switch to turn that Sub off entirely if it is not needed but I think I like it running this way. Buddy Quote Link to post Share on other sites
Frank 177 Posted June 9, 2010 Report Share Posted June 9, 2010 I too have used this quite often but it would be nicer to have the ability to watch the set variables as the script runs. That would be excellent. Frank Quote Link to post Share on other sites
Luke 18 Posted June 9, 2010 Report Share Posted June 9, 2010 I too have used this quite often but it would be nicer to have the ability to watch the set variables as the script runs. ?? You mean while your script is running, the variable doesn't change at the top of your ubot browser for you? Quote Link to post Share on other sites
Luke 18 Posted June 19, 2010 Report Share Posted June 19, 2010 Advanced tip: Say you have 20 Subs in a bot. At the start of each sub set your #statmon variable (as per the purpose of this thread) to a sequential number like "1" for the first sub, or 5 for the fifth. Then as you go programming through it, add little notes, especially in your "Then" and "Else" nodes of what's happening at the moment, but always start those notes out with the number of that sub... EX: "17: Completed Signup at Twitter" That way, even if you're away from the bot when it breaks, you'll know EXACTLY where the bot broke once you come back to it, down to the Sub and the choice it last made. 1 Quote Link to post Share on other sites
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.