Page 1 of 1

Importing scripts from SL

Posted: Sat May 18, 2013 8:14 am
by Pinke Latte
Hey folks~. I've been trying to import some public domain scripts from SL that I used quite a bit in builds over there, so I can use 'em over here, too.

However, every time I try to get them to work, I get this:

Error CS0236: A field initializer cannot reference the nonstatic field, method, or property 'SecondLife.Script.null_key'

I'm not that script savvy, so I'm unsure what this means, and google wasn't much help. Is this because of a difference in LSL and OSSL? Any help would be appreciated, would like to know if it's a compatibility bug that can't be worked around, so I can stop fussing over it lol.

Re: Importing scripts from SL

Posted: Sat May 18, 2013 10:29 am
by Ilan Tochner
Hi Pinke,

I suggest you try replacing references to SecondLife.Script.null_key with NULL_KEY

Re: Importing scripts from SL

Posted: Sat May 18, 2013 11:59 am
by Graham Mills
Perhaps the error is similar to this one, i.e. a global variable (normally close to the top of the script and outside any function) is defined in terms of another variable?

http://www.inworldz.com/forums/viewtopi ... =12&t=4706

Re: Importing scripts from SL

Posted: Sat May 18, 2013 9:42 pm
by Pinke Latte
I fixed it by retyping all the null_keys to NULL_KEY and replacing null_str with ""

So now they save with no errors for the most part (a few of them give me warnings that they have multiple things assigned to certain names so they might function differently in OSSL compared to LSL, but yeah)...

Now I just have to figure out why one of the scripts that checks for extra scripts in the object is treating the rest of the necessary scripts as unauthorized, lol! Such is the way of trial and error. :3

Re: Importing scripts from SL

Posted: Sat May 18, 2013 10:18 pm
by Constance Peregrine
Graham Mills wrote:Perhaps the error is similar to this one, i.e. a global variable (normally close to the top of the script and outside any function) is defined in terms of another variable?

http://www.inworldz.com/forums/viewtopi ... =12&t=4706
just an fyi, tho one of the scriptors who posted there are very good, they are no longer in that grid and inwz forked off from current opensim dev work [i heard recently @ 6.5 or so]

Kristen Mynx is in 3rd rock grid and sl I guess...i don't know her but of her work in 3rd and she is very very good

I would not use inwz as a place to get scripting info for current os as kitely is [and everyone else]

especially as it was 3 years old...lol

Re: Importing scripts from SL

Posted: Sat May 18, 2013 10:47 pm
by Graham Mills
OK, I'll leave the scripting advice to others.

Re: Importing scripts from SL

Posted: Sat May 18, 2013 11:00 pm
by Constance Peregrine
Graham Mills wrote:OK, I'll leave the scripting advice to others.
lol....Graham, I was just pointing out that inwz is not current with os development....they have tons of bug/issues as a result they are having to fix all the time, as their mantis shows.

Nothing on you and did not mean it to come off that way-)))