|
Carbon Philter
Registered User
Join date: 4 Apr 2008
Posts: 165
|
11-12-2008 07:02
Hello, experienced Scripters. I'm trying to master the complex world of scripting and am wading my way through the Wiki. I've been creating and running scripts based on the Wiki examples and have hit a snag with one that I don't understand and would appreciate some advice.
Re. sculpted prims the example -
llSetPrimitiveParams([PRIM_TYPE, PRIM_TYPE_SCULPT, "d962089b-2197-993c-9ec9-4993eb0a95f2", // sculpty texture PRIM_SCULPT_TYPE_SPHERE // type ]); throws up a syntax error at 0, 21 and I can't see where it's wrong. Thanks in anticipation
|
|
Tyken Hightower
Automagical
Join date: 15 Feb 2006
Posts: 472
|
11-12-2008 07:10
I assume that's not the whole script, since your error is on line zero?..
|
|
Carbon Philter
Registered User
Join date: 4 Apr 2008
Posts: 165
|
11-12-2008 09:14
From: Tyken Hightower I assume that's not the whole script, since your error is on line zero?.. Yup, that's the whole caboodle. I just copy/pasted it from the Wiki. Thta's what I've been doing with other examples just to see what action occurs. This one registers error as I said while others compile ok. Please tell me if I'm doing it wrong. Thanks
|
|
Faust Vollmar
llSetAgentSanity(FALSE);
Join date: 3 Feb 2007
Posts: 87
|
11-12-2008 09:28
From: Carbon Philter Yup, that's the whole caboodle. I just copy/pasted it from the Wiki. Thta's what I've been doing with other examples just to see what action occurs. This one registers error as I said while others compile ok. Please tell me if I'm doing it wrong. Thanks LSL works with States and Events. Should have a look at these 2 pages. http://wiki.secondlife.com/wiki/Statehttp://wiki.secondlife.com/wiki/Category:LSL_Eventsthe default state is required in all scripts. default { } you'd call what you pasted inside an event, depending on when you want it to happen. (On rez, on touch, state entry, that kind of stuff.) Say we want it to happen on touch. It'd look like this: (Cursed forums and unable to use indents) default { touch_start(integer Num) { lSetPrimitiveParams([PRIM_TYPE, PRIM_TYPE_SCULPT, "d962089b-2197-993c-9ec9-4993eb0a95f2", // sculpty texture PRIM_SCULPT_TYPE_SPHERE // type ]); } }
|
|
Bloodsong Termagant
Manic Artist
Join date: 22 Jan 2007
Posts: 615
|
11-12-2008 09:30
heyas;
if thats the whole thing, you're missing your default state and any/all events in it.
try this
default {
state_entry() { ....PUT YOUR CODE HERE... }
}
_____________________
Why Johnny Can't Rotate: http://forums.secondlife.com/showthread.php?t=94705
|
|
Carbon Philter
Registered User
Join date: 4 Apr 2008
Posts: 165
|
11-12-2008 17:02
Thanks for the help, Faust. Slowly getting the hang of it. Not complaing - it's all on the learning curve - but even your example had me pulling hair out by not compiling until I spotted your typo error, intentional or otherwise.  Once I got over that things began going better. So back to the class for me to learn some more!
|