The OpenSim parser is truly awful. I find that I have to modify the
scripts on the LSL wiki line by line until I can get something
working. The line numbers in the compilation error listing are often
bogus.
While I don't know yet what is wrong with yours, this tiny script
illustrates the kind of problem I run up against constantly:
Original script from
http://wiki.secondlife.com/wiki/LlAvatarOnSitTarget
...
default
{
state_entry()
{
// set sit target, otherwise this will not work
llSitTarget(<0.0, 0.0, 0.1>, ZERO_ROTATION);
}
changed(integer change) {
if (change & CHANGED_LINK) {
key av = llAvatarOnSitTarget();
if (av) {//evaluated as true if not NULL_KEY or invalid
llSay(0, "Hello " + llKey2Name(av) + ", thank you for
sitting down");
}
}
}
}
Errors:
Primitive: Error compiling script:
Line number 12, Error Number: CS0029, 'Cannot implicitly convert type
'int' to 'bool''
Line number 14, Error Number: CS0029, 'Cannot implicitly convert type
'string' to 'bool''
Revised script:
default
{
state_entry()
{
// set sit target, otherwise this will not work
llSitTarget(<0.0, 0.0, 0.1>, ZERO_ROTATION);
}
changed(integer change)
{
integer x = change & CHANGED_LINK;
if (x>0)
{
key av = llAvatarOnSitTarget();
string mess = "Hello "+ llKey2Name(av) + ", thank you for
sitting down";
integer avlen = llStringLength(av);
if (avlen > 0)
{
llSay(0, mess);
}
}
}
}
It's very frustrating fixing these scripts. The OpenSim group has been
slow to implement the Ll functions, but the basic parser is full of
problems with type casting and expression evaluation.
On Jul 11, 12:39 pm, "Welter Silva" <
welte...@gmail.com> wrote:
> thanks!
> I used the zip files (realxtendviewer_0.3_setup.exe and
> realxtendserver_0.3.zip)
>
> 2008/7/11 Lc <
lcc1...@gmail.com>:
>
>
>
> > i will have a look at that.
> > Did you use the zip file or the svn ?
>
> >> }- Hide quoted text -
>
> - Show quoted text -