sndbad Ghost Posted July 29, 2016 Posted July 29, 2016 hello friends i have probelm with media player scriptwhen i set PRIM_MEDIA_HEIGHT_PIXELSlike 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
Rolig Loon Posted July 29, 2016 Posted July 29, 2016 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.
sndbad Ghost Posted July 29, 2016 Author Posted July 29, 2016 so there is no way for fix that ? can i make the media work with full webside i mean automatically without set pixels size
Rolig Loon Posted July 29, 2016 Posted July 29, 2016 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
sndbad Ghost Posted July 29, 2016 Author Posted July 29, 2016 ok i understand now i keep try and i will back soon lol thanks
Recommended Posts
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