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.
Importing scripts from SL
-
- Posts: 4
- Joined: Sun May 12, 2013 2:29 am
- Has thanked: 0
- Been thanked: 0
- Ilan Tochner
- Posts: 6727
- Joined: Sun Dec 23, 2012 8:44 am
- Has thanked: 5249 times
- Been thanked: 4674 times
- Contact:
Re: Importing scripts from SL
Hi Pinke,
I suggest you try replacing references to SecondLife.Script.null_key with NULL_KEY
I suggest you try replacing references to SecondLife.Script.null_key with NULL_KEY
-
- Posts: 1314
- Joined: Sun Dec 23, 2012 2:26 pm
- Has thanked: 1134 times
- Been thanked: 1142 times
Re: Importing scripts from SL
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
http://www.inworldz.com/forums/viewtopi ... =12&t=4706
-
- Posts: 4
- Joined: Sun May 12, 2013 2:29 am
- Has thanked: 0
- Been thanked: 0
Re: Importing scripts from SL
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
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
- Constance Peregrine
- Posts: 2353
- Joined: Sun Dec 23, 2012 11:35 am
- Has thanked: 2784 times
- Been thanked: 1489 times
Re: Importing scripts from SL
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]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
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
Laissez faire et laissez passer, le monde va de lui même!
My little sounds store https://www.kitely.com/market?store=2040306
Ephemeral wanderer...
My little sounds store https://www.kitely.com/market?store=2040306
Ephemeral wanderer...
-
- Posts: 1314
- Joined: Sun Dec 23, 2012 2:26 pm
- Has thanked: 1134 times
- Been thanked: 1142 times
- Constance Peregrine
- Posts: 2353
- Joined: Sun Dec 23, 2012 11:35 am
- Has thanked: 2784 times
- Been thanked: 1489 times
Re: Importing scripts from SL
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.Graham Mills wrote:OK, I'll leave the scripting advice to others.
Nothing on you and did not mean it to come off that way-)))
- These users thanked the author Constance Peregrine for the post:
- Sierra Jakob
Laissez faire et laissez passer, le monde va de lui même!
My little sounds store https://www.kitely.com/market?store=2040306
Ephemeral wanderer...
My little sounds store https://www.kitely.com/market?store=2040306
Ephemeral wanderer...