Talk:Chatbot
Wishes
We could/ should soon add ...
- llGetFreeMemory in the demo
- discover the time of day -- say if World > Force Sun > Region Default would show sunrise, noon, sunset, midnight, or what
- move to owner and stop moving
- parsing of prefix monadic + - arithmetic operators, for scalar and vectors and rotations
- parsing of infix dyadic + - * / % arithmetic operators with precedence, on pairs of values of the same type, on vector/ rotation pairs, on rotation/ vector pairs
Also the Chatbot and Hello Avatar examples should learn from each other, e.g.:
llSetStatus(STATUS_PHYSICS, FALSE); llSleep(0.1); llSetLocalRot(llRotBetween(<1, 0, 0>, llGetSunDirection())); // turn the East face to the Sun
Bugs
This Chatbot script works reasonably well for some of us ... how about you? If not, why not?
Bug: Channel number omitted, comma included, in echo of list value
STEPS TO REPRODUCE:
/7 [a, b, c] // a list value
EXPECTED RESULTS:
/7 [a, b, c] // a list value [a, b, c]
ACTUAL RESULTS:
// [a, b, c] // a list value , [a, b, c]
See? The channel number 7 is missing from the echo, broken by design.
See? A spurious string ", " of comma and blank appears before the expected result, who knows why.
Another example that produces the spurious ", " is:
/7 [llGetFreeMemory(), llGetFreeMemory(), llGetFreeMemory()]
Thus likely this bug is with output of type list, not with input of type list.
-- Ppaatt Lynagh 07:42, 14 September 2007 (PDT)
Bug: (316, 48) : ERROR Syntax Error
(316, 48) : ERROR Syntax Error Second Life 1.18.2 (0) Aug 10 2007 09:34:24 (Second Life Release)
-- kindly reported by e-mail
I suspect we're facing some difficulty in perfecting the accuracy of the copy/ paste of a thousand lines of script.
The Second Life client app that works for me says it was released to me just ~3 minutes later: Help > About Second Life is "Second Life 1.18.2 (0) Aug 10 2007 09:37:04 (Second Life Release)"
Here I see:
Compile successful, saving... Save complete.
...
"Line 316, Column 0" in world is:
return [llRequestAgentData(llList2Key(ps, 0), llList2Integer(ps, 1))];
Hard to understand how that syntax can be wrong while the previous syntax is correct.
...
I've stored a copy of this script as Chatbot-lsl-20070913.txt at http://members.aol.com/ppaatt/indexed/secondlife/
My integrity checks on the script here are:
$ ls -l Chatbot-lsl.txt -rw-r--r--@ 1 pat staff 22876 13 Sep 20:02 Chatbot-lsl.txt $ openssl md5 Chatbot-lsl.txt MD5(Chatbot-lsl.txt)= 9373258278a20329c7ba39353454059c $
Does that copy work for you?
-- Ppaatt Lynagh 20:12, 13 September 2007 (PDT)
A: Sorry, Ppaatt, no. I get
(316, 48) : ERROR Syntax Error
even when using the source @ aol.com. But as I don't use Linux, I couldn't check integrety.
--Huney Jewell 21:32, 13 September 2007 (PDT)
_____________________________________________________________________________________
Ppaatt, thanks for the response
Your volunteer status is noted and appeciated.
I tried commenting out blocks of code before/after but still got the same error.
I then tried breaking that huge if..else..else into three if statements. That compiled, so the issue is the number of else's in an if statement.
Regards
TimZim Teatime
_____________________________________________________________________________________
Ah fun.
1.
Me, I'm using Mac OS X. Yes please let's chase this theory that the results vary by client platform: Apple Mac OS X, Linux, Windows, whatever.
I'll return here with a short example that contains nothing but the resultOf routine called by default.state_entry. Then someone for whom http://members.aol.com/ppaatt/indexed/secondlife/Chatbot-lsl-20070913.txt fails can try that example, and prove that such a short example still fails.
I'll also provide an almost identical short example that differs only by breaking the huge if..else..else into three if statements. Then someone can prove that some platforms fail the huge if..else..else and accept the broken if..else..else.
Once we have a simple good/bad test case, then we can run down what the limit is exactly, in terms of a count of else if branches allowed. Then we can write a wiki article here to announce to the world this limit that we must live by.
Or ... we can volunteer you to do that work of defining this experiment in detail for us, as well as the work of conducting the experiment. :-)
2.
I'll work on getting Linux or Windows to boot here. Are any of you who see failure already using Linux by chance? That would be easiest, e.g., kernel.org Knoppix Linux I can boot from DVD-R or CD-R.
Getting Windows going will be harder, but eventually possible, I think. I can borrow a license from work and deploy Windows somewhere.
3.
llGetFreeMemory might be relevant in world.
I'll return here with a quote of what my llGetFreeMemory is.
4.
Thanks again and again in advance,
-- Ppaatt Lynagh 03:49, 14 September 2007 (PDT)