Jump to content

is the "PRIM_PROJECTOR" parameter invalid?


Mayumi Hirano
 Share

You are about to reply to a thread that has been inactive for 898 days.

Please take a moment to consider if this thread is worth bumping.

Recommended Posts

Always got error.
"llGetPrimitiveParams error: Param 0 error, unknown parameter"


"llSetPrimitiveParams" will work fine even if PRIM_PROJECTOR is specified.

default
{
    state_entry()
    {
        list params = llGetPrimitiveParams([ PRIM_PROJECTOR ]);
//      list params = llGetLinkPrimitiveParams(LINK_THIS,[ PRIM_PROJECTOR ]);
    }
}
 

Edited by Mayumi Hirano
Link to comment
Share on other sites

Last I recall hearing, the PRIM_PROJECTOR parameter is currently write-only. So it will work for the llSetPrimitiveParams functions but not for their llGetPrimitiveParams counterparts.

Edit: found it. They stated the parameter was write-only in the server release notes.

https://releasenotes.secondlife.com/simulator/2021-10-25.565008.html

Edited by Fenix Eldritch
  • Thanks 2
Link to comment
Share on other sites

  • Lindens
On 1/28/2022 at 4:28 AM, Mayumi Hirano said:

Always got error.
"llGetPrimitiveParams error: Param 0 error, unknown parameter"


"llSetPrimitiveParams" will work fine even if PRIM_PROJECTOR is specified.

default
{
    state_entry()
    {
        list params = llGetPrimitiveParams([ PRIM_PROJECTOR ]);
//      list params = llGetLinkPrimitiveParams(LINK_THIS,[ PRIM_PROJECTOR ]);
    }
}
 

For the time being PRIM_PROJECTOR is write only.  You can use llSetPrimitiveParams to set the value, but you can not read it back.

 

  • Like 2
Link to comment
Share on other sites

  • 1 month later...
On 1/31/2022 at 11:06 AM, Rider Linden said:

For the time being PRIM_PROJECTOR is write only.  You can use llSetPrimitiveParams to set the value, but you can not read it back.

 

I'm trying to see how this works and all I get is an error,  script compiles fine, but when clicking it,  it  llSetPrimitiveParams error running rule #1 (PRIM_PROJECTOR): arg #1 is missing.

No idea what I'm missing.

Link to comment
Share on other sites

26 minutes ago, Wulfie Reanimator said:

Show the call?

well I'm a bit dense as it's 4am.

 

but I came up with this

 

integer projection;

default
{
    touch_start(integer total_number)
    {
   
                llSetPrimitiveParams(
                
                  [ PRIM_PROJECTOR ] );
            
{
    
}
}
}

which gives the error,  I bet I'm missing something,  bit tired and had a bug up my arf and wanted to tinker.

Link to comment
Share on other sites

57 minutes ago, bigmoe Whitfield said:

llSetPrimitiveParams([PRIM_PROJECTOR]);

which gives the error,  I bet I'm missing something,  bit tired and had a bug up my arf and wanted to tinker.

When you use the Set functions, the rule has to be followed by all of its parameters, which you can generally find on the wiki. Molly also posted the specific ones you need to have.

Link to comment
Share on other sites

10 hours ago, Mollymews said:

[ PRIM_PROJECTOR, string  texture , float  fov, float  focus, float  ambiance ]

is the LSL method for Edit \ Features \ Light (which we never had in LSL before) A use of which is to be able to change/flip the texture programatically. Changing the shape of the light projector beam

okay I've come up with [ PRIM_PROJECTOR, string xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx , float  0.167, float  0.00, float  0.00 ] );

 

but the script I am trying to make comes up with a syntax error, so I've got something borked,  swear I know this, I should be able to do this,  I'm having an off day.

Link to comment
Share on other sites

Just now, bigmoe Whitfield said:

okay I've come up with [ PRIM_PROJECTOR, string xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx , float  0.167, float  0.00, float  0.00 ] );

should be: [ PRIM_PROJECTOR, xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx , 0.167, 0.00, 0.00 ]

Link to comment
Share on other sites

4 minutes ago, Mollymews said:

should be: [ PRIM_PROJECTOR, xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx , 0.167, 0.00, 0.00 ]

default
{
    touch_start(integer total_number)
    {
   
                llSetPrimitiveParams(
                
                  [ PRIM_PROJECTOR, xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxxx, 0.167, 0.00, 0.00 ] );
            
{
    
}
}
}




it dont like me, LOL.  sorry molly, I'm just waking up. 

Edited by bigmoe Whitfield
Link to comment
Share on other sites

1 minute ago, bigmoe Whitfield said:

default
{
    touch_start(integer total_number)
    {
   
                llSetPrimitiveParams(
                
                  [ PRIM_PROJECTOR, xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx x, 0.167, 0.00, 0.00 ] );
            
{
    
}
}
}




it dont like me, LOL.  sorry molly, I'm just waking up. 

Yes I changed the x to my own key I have for the texture.

Link to comment
Share on other sites

Just now, bigmoe Whitfield said:

Yes I changed the x to my own key I have for the texture.

i haven't tested this with a texture key myself, so I don't know if it does accept a uuid.  I have only used it with texture names (copy of in Contents)

Link to comment
Share on other sites

3 minutes ago, bigmoe Whitfield said:

okay, ugh, I should of tried that too.   more tinkering.

 

6 minutes ago, Mollymews said:

i haven't tested this with a texture key myself, so I don't know if it does accept a uuid.  I have only used it with texture names (copy of in Contents)

I got it working now,  ty molly,  brain dead sox I am.

  • Like 1
Link to comment
Share on other sites

2 minutes ago, bigmoe Whitfield said:

 

I got it working now,  ty molly,  brain dead sox I am.

is all good. We can all have our moments at times

also for anyone reading then in the first instance set FOV to 1.0 so that the light shows more readily, then dial it down from there as you want

Link to comment
Share on other sites

2 hours ago, bigmoe Whitfield said:

okay I've come up with [ PRIM_PROJECTOR, string xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx , float  0.167, float  0.00, float  0.00 ] );

but the script I am trying to make comes up with a syntax error

I know you've gotten past it already, but I figured I'd just expand on this and explain why you were told one thing, and then told another.

Molly's initial post was presenting you with the documentation for the input list. That typically includes variable types - but that is just for our knowledge/benefit. The function that takes the list as input already expects each element to be of a certain type and doesn't need it to be redefined. Thus the expectation is that you omit the types when actually writing it out . You only include variable types when declaring variables: which can include standalone local/global variables, and also the parameter variables of event and function handlers.

  • Like 1
Link to comment
Share on other sites

a liitle story about Listening Linden and PRIM_PROJECTOR

a while ago now we were talking in this forum about how we had to use multiple linked prims to be able to change the shape of the light, and how come we couldn't change this with LSL

as I remember Rider Linden popped into the  thread and said they couldn't understand why not either, seemed a bit of an oversight that we couldn't. A little time later set PRIM_PROJECTOR happened

for sure is best to file a JIRA, just  don't be shy to talk about things that you might find useful as well

Link to comment
Share on other sites

You are about to reply to a thread that has been inactive for 898 days.

Please take a moment to consider if this thread is worth bumping.

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
 Share

×
×
  • Create New...