This project is read-only.
1

Closed

reader.readstring()

description

I've Always Assumed Order of Trigger Values was required.. Though VB.Net Example has a Bug in 2000+ to Console due to the order being used
 
Problem isn't about Avoiding the Exception Errors.. Its about the Data getting Lost,. If theres Data Exceptions are Avoided... I Don't want to slap on a Bandaid when stitches are needed. I think I prefer the Exception errors because the Data is getting lost. Peek methods might Make it harder to Spot the Trouble
 
I think it'd be better to put the reads into a try,catch Statement
 
        Try                reader.readstring                reader.readnumber            Catch ex As Exception
            Console.WriteLine(ex.Message)
            Return False
        End TryThis would Give the User a way to Syntax Check thier ScriptsWould be great if there was a Way to Print the Line Number of the Script file Thworing the ErrorIE:Line: 1 MSpeak: (0:1) Invalid Syntax
Test MonkeySpeak
 
(0:0) When the bot starts, (5:400) use SQLite database file {%~msPath/Arena.S3db} or create file if it does not exist with table "Furre". (5:401) Create table {Fighter1} if it does not exist. (5:402) Create column {Name} in table {Fighter1} if it does not exist. (5:402) Create column {[Bid Ammount]} in table {Fighter1} if it does not exist. (5:401) Create table {Fighter2} if it does not exist. (5:402) Create column {Name} in table {Fighter2} if it does not exist. (5:402) Create column {[Bid Ammount]} in table {Fighter2} if it does not exist. *PlaceBet1 "~bettingname" - %betamount (0:23) When someone emits something with {PlaceBet1} in it, (5:110) use variable %~Message and take word 2 and put it into variable %name (5:110) use variable %~Message and take word 3 and put it into variable %ammount
 

 
I Updated My Subversion to your recent
 
msMsg = PlaceBet1 Msg = Welcome to the <a href=http://www.furcadia.com/maps/silvershowcase.jpg>Silver Sponsor's Showcase</a>! Everyfurre is welcome here in this lush jungle dream. Sponsors may upload to the portals by choosing their gem color with F3 on the portals and then facing for the control-t upload. Be sure to take a ride on a friendly turtle while you are here. For more info on becoming a sponsor, go to http://www.furcadia.com/digomarket (Dream by Gemedet, Ryhn, Zephyr and others.) msgContains Begin Execution
 
ReadString
 
TriggerReaderException: End of values reached.
 
PeekString test
 
    Function msgContains(reader As TriggerReader) As Boolean
        Debug.Print("msgContains Begin Execution")
        Dim msMsg As String = ""
        If Not reader.PeekString Then msMsg = reader.ReadString()
        Debug.Print("msMsg = " & msMsg)
        Dim msg As String = Main.MSpage.GetVariable("%~Message").Value.ToString
        Debug.Print("Msg = " & msg)
        Return msg.Contains(msMsg)
    End FunctionmsgContains Begin ExecutionmsMsg = Msg =   Welcome to the <a href=http://www.furcadia.com/maps/silvershowcase.jpg>Silver Sponsor's Showcase</a>! Everyfurre is welcome here in this lush jungle dream. Sponsors may upload to the portals by choosing their gem color with F3 on the portals  and then facing for the control-t upload. Be sure to take a ride on a friendly turtle while you are here. For more info on becoming a sponsor, go to http://www.furcadia.com/digomarket (Dream by Gemedet, Ryhn, Zephyr and others.)Ok So I'm Still Loosing msMsg when it Should be "PlaceBet1"Where's the Black Hole of Null Stealing my Values?Now ReadNumber is Loosing Data in a diferent MS Line Since I Used the PeekString Bandaid. The Queueing System Needs some Open Heart Surgery
Closed Aug 29, 2014 at 11:01 AM by Squizzle

comments

Gerolkae wrote May 6, 2012 at 7:46 PM

I'm gonna use the Try-Catch Blocks for the readers. Adding a TextBox to Silver monkey's Variable Window. The Text Box will be tied to the Catch statment. That Will Help in trouble Monkey Speak Scripts

Good luck with the baby. I've always been Patient with you. :)

wrote Feb 13, 2013 at 1:40 AM

wrote May 15, 2013 at 3:59 AM

wrote May 15, 2013 at 3:59 AM

wrote Jun 14, 2013 at 7:46 AM

wrote Aug 29, 2014 at 11:01 AM