Jump to content
You are about to reply to a thread that has been inactive for 3060 days.

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

Recommended Posts

Posted

hello friends 

i have probelm with media player script

when i set 

 

PRIM_MEDIA_HEIGHT_PIXELS

like 2150 i get this problem 

llSetPrimMediaParams error: Bounds error near parameter #4, param=10. No values have been set.

idk why 

 

here is script 

basic from SL

 

init()
{
    integer face = 2;
    integer w = 990;
    integer h = 2150;
    string url = "https://www.youtube.com/";
 
    llClearPrimMedia(face); // forces refresh of cache if reloading the same page
    llSetPrimMediaParams(face, [
        PRIM_MEDIA_CURRENT_URL, url,
        PRIM_MEDIA_AUTO_SCALE, TRUE,
        PRIM_MEDIA_AUTO_PLAY, TRUE,
        PRIM_MEDIA_WIDTH_PIXELS, w,
        PRIM_MEDIA_HEIGHT_PIXELS, h
    ]);
}
 
default
{
    state_entry()
    {
        init();
    }
 
    on_rez(integer start_param)
    {
    }
}

thanks 

and best regards 

 

Posted

The problem is that the expected values for height and width are supposed to be powers of 2 in the range [0,2048]. As with many other variables in SL, if you do not provide a power of 2 value, the system will automatically round up to the next power of 2.  So, your stated value of h = 2150 will be rounded up to 4096, which is way outside the allowed range.  Hence, you get a STATUS_BOUNDS_ERROR.

Posted

Fix?  As in, use non-power of two values?  No, but you could rescale the entire display, if that doesn't make things too small to read. If you look at the wiki notes on that function, you'll see

 

  • Both width and height must be specified together to work, and they narrow the texture space while inversely widening the aperture.
    • width and height scaled larger than 1024pixels will require the texture backdrop to be resized to fit(see Useful Snippets)
      • if resized to fit, the resulting view will cut off scrolled content outside the bounds making it impossible to be viewed

 

You are about to reply to a thread that has been inactive for 3060 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
×
×
  • Create New...