Congratulations DJ Sures, for answering the question and has received an EZ-Credit award! Share what you have learned and create a tutorial to help others by clicking here.

Correct Format For Control Command

Assistance Requested

Help Steve G with their question and receive $10 of EZ-Credit to get more robots and parts from our store. The following information was provided about their previous efforts searching tutorials for a resolution.

Steve G claims to have checked these sources:

I've stumbled across a strange formatting issue and I'm hoping someone can point me in the right direction. I say strange, as most of the time it works fine, but a few times, it doesn't

The scenario is, I have the Popup Display plugin and a Pandorabot control. I am using the following Popup Display ControlCommand() in the Pandorabots "Response Script" script editor...


ControlCommand("Display Popup", Display, "" +$pandoraResponse)

which for the main part seems to be working okay. But there are certain Pandorabot responses that throws out a "Error on line 1: Input string was not in a correct format." which relates to the Popup ControlCommand() as the display does not pop up as it should. As far as I can tell, there's nothing wrong with the AIML category, but the display does pop up on most of the other responses. Nothing else is involved, just what's outlined above.

Has anyone got any ideas what is causing the error?

I have found a few conversations, tutorials and activities that may help with your question. Take a look at these links. I've sorted them by what I believe to be most relevant but that is not always the case as I'm still learning.

Also, consider reviewing the Learn section for informative lessons and activities. Check it out!


Use the variable watcher and give us examples of the data in the $pandoraResponse that's causing the error


Wow DJ, You're up late (or really early). Smile

Sure. Here's a screen grab with the variable watcher added...

User-inserted image

and another of the AIML code I'm using that kicks out the error (can't put it in code tags as it won't format properly)...

User-inserted image

Like I said, it's weird that most of the other AIML codes work without the error, just the "what is your name" one and a couple of others which I can't remember which. This one works fine with no errors and brings up the popup display...

User-inserted image

It's formatted exactly the same as the "ask name" one. Here's the script I'm using in the Pandora response script (also in post #1)


ControlCommand("Display Popup", Display, "" +$pandoraResponse)

User-inserted image

Have I formatted that ControlCommand() correctly? If you need anything else, give us a shout.


EDIT: Here's a quick vid of it in action...



Well, I figured it out. Anything with E4 B4 (upper case) in the AIML files was causing the error. I reformatted it to e4 b4 (lower case) and low and behold... it worked. Smile There's a few other default AIML files that have the same issues that uses tags within tags that the popup display doesn't like, but it's something I can live with so no real problem.


I believe you may be running into the exponent bug I ran into a while back when working with data from a web page. With a text string, any time a capital E is directly followed by a number, the script language interprets it as an exponent and not text.

I would be interested if the error is still thrown if you lowered just the E and left the B as uppercase just to see if the problem is really the exponent bug.



You saying that just reminded me of your thread. Pandora is having a little bit of "me" time right now. When it's back up, I'll give it a try and see what happens.



Strange things afoot. I tried using lowercase "e" and uppercase "B", published the changes, and it still worked with the popup showing, no error. Now the strange thing. When I use the Pandorabot "train" interface, the "B" shows as lowercase. I then tried both uppercase "E"4 and "B"4, they both show as lowercase in the train interface and, ready for this... in the popup display as well, no error this time. *confused*


So it looks like the train interface changes everything to lowercase, thereby returning the text in lowercase. Which, in turn, supplies lowercase e to the popup display.

At least the fact that making the E lowercase while leaving the B uppercase confirms that it is the exponent bug at work here. Assuming I understand you correctly.

I would have sworn I tried lowercase e when I was looking for a workaround to the bug, but I guess not. I ended up changing it from E to E' instead. So E297 would be E'297. In your case E'4. The single quote mark was not spoken when the Say command was used, nor was there any lag between the E and the number when spoken, so it worked out Ok for what I was doing. Anyway, I tried substituting a lowercase e and that worked fine. So that seems to be the best overall workaround for now.

Just a reminder while we are on the topic, the other bugs were the combination \" (backslash followed directly by a double quote) and a left paren anywhere in the string. Both cause crashes in the script. Fortunately, those are not likely to end up an a response from Pandorabot, but ya never know.




t looks like the train interface changes everything to lowercase, thereby returning the text in lowercase. Which, in turn, supplies lowercase e to the popup display.

Not so much, at least not everything. If you check out the first screen grab in post #3 (top right corner), at the start of the senstance the "I" is still uppercase as well as "December". Interesting about the backslash and quote marks.

The "E4 B4" format is still working (at least it was a couple of hours ago) both in the training interface and popup display. Ther is a good chance you did try lowercase "e", as there is some weird stuff happening. Anyway, at least it's not the popup displays fault, just the AIML.


Just wanted to mark this as resolved. As I ended up resolving it myself, I'll credit DJ so he can put the credit back in to the kitty.

Thanks guys.