knguon Posted February 22, 2012 Share Posted February 22, 2012 I just wanted to write "The Tioga" on a prim...Help?this is what i have so far:default{ state_entry() { llSetText("The Tioga",<0,0,0>,0); } touch_start(integer total_number) llSay(0, "Touched."); }}I keep getting:(8,8) Error, Syntax error. Link to comment Share on other sites More sharing options...
Ron Khondji Posted February 22, 2012 Share Posted February 22, 2012 Count your curly brackets. Or just delete the touch event alltogether as you don´t need that anyway. Matter of fact, you can delete the whole script once the text is set. Also, you are writing text in black invisible letters. The last 0 in llSetText means full transparent. Change that to 1.0. Link to comment Share on other sites More sharing options...
knguon Posted February 22, 2012 Author Share Posted February 22, 2012 I'm confused, as you could probably tell, I'm new to scripting. Is there a bracket limit? Or something? And what would I need to do to just state, "The Tioga" Link to comment Share on other sites More sharing options...
Ron Khondji Posted February 22, 2012 Share Posted February 22, 2012 No, there are no limits, as far as I know. You just missed one. touch_start(integer total_number) llSay(0, "Touched.");} Should be: touch_start(integer total_number){ llSay(0, "Touched.");} But anyway, all you really need is this; default{ state_entry() { llSetText("The Tioga",<0,0,0>,1.0); }} 1 Link to comment Share on other sites More sharing options...
knguon Posted February 22, 2012 Author Share Posted February 22, 2012 Thanks so much for the help, but for some reason, I don't see it on the prim? Link to comment Share on other sites More sharing options...
Ron Khondji Posted February 22, 2012 Share Posted February 22, 2012 When the script got the syntax error, it probably unticked the 'running box' at the bottom. Make sure that box is ticked. Link to comment Share on other sites More sharing options...
knguon Posted February 22, 2012 Author Share Posted February 22, 2012 I don't really understand why it won't work. The script saves and its ticked on running but I don't see it on my prim... Link to comment Share on other sites More sharing options...
Dora Gustafson Posted February 22, 2012 Share Posted February 22, 2012 The script makes a hover text, floating over your prim not on your prim. The text fades away as you move away from the prim, so you need to be close enough to see it. There are no limit to the number of brackets, but the syntax requires that opening and closing brackets are matching In other words: for every opening bracket there must be a closing bracket. Link to comment Share on other sites More sharing options...
Ela Talaj Posted February 22, 2012 Share Posted February 22, 2012 Your text is in black. so would be hard to see especially at nite. Put this: default { state_entry() { llSetText("The Tioga",<1.0,1.0,1.0>,1.0); } } By the way who the heck is Tioga? Link to comment Share on other sites More sharing options...
Ron Khondji Posted February 22, 2012 Share Posted February 22, 2012 The problem was: the OP was in a no-script region. Oh, and the Tioga is a hotel in California. Link to comment Share on other sites More sharing options...
Jeffrey Ketterley Posted April 20, 2012 Share Posted April 20, 2012 I'm also new to scripting and im getting a syntax error as well. this is the script i'm working on. 1 play() 2 { 3 string html = " 4 <html> 5 <head> 6 <object width=\"2048\" height=\"2048\" type=\"application/x-shockwave-flash\" data=\"http://flash-effects.com/swf/water_ripple_follow.swf\" id=\"sb-content\" style=\"visibility: visible;\"><param name=\"bgcolor\" value=\"#000000\"><param name=\"allowFullScreen\" value=\"true\"></object></body> 7 </html>"; 8 9 // html = "data:text/html," + llEscapeURL(html); // you may need to escape funny chars 10 html = "data:text/html," + html; // or not, this depends upon your URL's 11 llSetPrimMediaParams(0, // Side to display the media on. 12 [PRIM_MEDIA_PERMS_CONTROL , PRIM_MEDIA_PERM_NONE, 13 PRIM_MEDIA_PERMS_INTERACT, PRIM_MEDIA_PERM_ANYONE, 14 15 PRIM_MEDIA_AUTO_PLAY,TRUE, // Show this page immediately 16 PRIM_MEDIA_CURRENT_URL,html, // The url currently showing 17 PRIM_MEDIA_HOME_URL,html, // The url if they hit 'home' 18 PRIM_MEDIA_HEIGHT_PIXELS,2048 , // Height/width of media texture will be 19 PRIM_MEDIA_WIDTH_PIXELS,2048 // rounded up to nearest power of 2. 20 21 ]); 22 23 } 24 25 default 26 { 27 state_entry() 28 { 29 play(); 30 } 31 32 on_rez(integer p) 33 { 34 llResetScript(); 35 } 36 } (0,0) : ERROR : Syntax error can anyone help me with this? Link to comment Share on other sites More sharing options...
Rolig Loon Posted April 20, 2012 Share Posted April 20, 2012 It looks fine to me and it compiles --- after I removed the line numbers and a bunch of bogus hidden line feed characters in the play function. My guess is that you were using a word processor or some other editor that stuffs formatting characters into text, assuming that you are writing a memo instead of code. Here's a clean copy.... play(){ string html = "<html><head><object width=\"2048\" height=\"2048\" type=\"application/x-shockwave-flash\" data=\"http://flash-effects.com/swf/water_ripple_follow.swf\" id=\"sb-content\" style=\"visibility: visible;\"><param name=\"bgcolor\" value=\"#000000\"><param name=\"allowFullScreen\" value=\"true\"></object></body></html>"; // html = "data:text/html," + llEscapeURL(html); // you may need to escape funny chars html = "data:text/html," + html; // or not, this depends upon your URL's llSetPrimMediaParams(0, // Side to display the media on. [PRIM_MEDIA_PERMS_CONTROL , PRIM_MEDIA_PERM_NONE, PRIM_MEDIA_PERMS_INTERACT, PRIM_MEDIA_PERM_ANYONE, PRIM_MEDIA_AUTO_PLAY,TRUE, // Show this page immediately PRIM_MEDIA_CURRENT_URL,html, // The url currently showing PRIM_MEDIA_HOME_URL,html, // The url if they hit 'home' PRIM_MEDIA_HEIGHT_PIXELS,2048 , // Height/width of media texture will be PRIM_MEDIA_WIDTH_PIXELS,2048 // rounded up to nearest power of 2. ]);}default{ state_entry() { play(); } on_rez(integer p) { llResetScript(); }} Link to comment Share on other sites More sharing options...
Jeffrey Ketterley Posted April 20, 2012 Share Posted April 20, 2012 Thank you for your help. Very much appreciated. Link to comment Share on other sites More sharing options...
Jeffrey Ketterley Posted April 20, 2012 Share Posted April 20, 2012 Ok, I'm trying to get the water to ripple when you place your cursor across the water. Like the ripple follows your cursor when you move it. and the script isnt doing it for some reason. play(){ string html = "<html><head><object width=\"2048\" height=\"2048\" type=\"application/x-shockwave-flash\" data=\"http://flash-effects.com/swf/water_ripple_follow.swf\" id=\"sb-content\" style=\"visibility: visible;\"><param name=\"bgcolor\" value=\"#000000\"><param name=\"allowFullScreen\" value=\"true\"></object></body></html>"; // html = "data:text/html," + llEscapeURL(html); // you may need to escape funny chars html = "data:text/html," + html; // or not, this depends upon your URL's llSetPrimMediaParams(0, // Side to display the media on. [PRIM_MEDIA_PERMS_CONTROL , PRIM_MEDIA_PERM_NONE, PRIM_MEDIA_PERMS_INTERACT, PRIM_MEDIA_PERM_ANYONE, PRIM_MEDIA_AUTO_PLAY,TRUE, // Show this page immediately PRIM_MEDIA_CURRENT_URL,html, // The url currently showing PRIM_MEDIA_HOME_URL,html, // The url if they hit 'home' PRIM_MEDIA_HEIGHT_PIXELS,2048 , // Height/width of media texture will be PRIM_MEDIA_WIDTH_PIXELS,2048 // rounded up to nearest power of 2. ]);}default{ state_entry() { play(); } on_rez(integer p) { llResetScript(); }} Link to comment Share on other sites More sharing options...
Rolig Loon Posted April 20, 2012 Share Posted April 20, 2012 That's an interesting challenge. It's a bit outside my own range of experience, but I doubt that you'll be able to do it the way you are trying to (if you can do it at all). MOAP is designed for displaying static web pages, not for real time interactivity. Darkie or Peter may have more insight if they drop by this thread. Link to comment Share on other sites More sharing options...
Jeffrey Ketterley Posted April 20, 2012 Share Posted April 20, 2012 Ok, well thank you for trying to help me with it. an the help you gave me with the script. Link to comment Share on other sites More sharing options...
PeterCanessa Oh Posted April 20, 2012 Share Posted April 20, 2012 Nothing here. I think Qie's the expert on media. My only knowledge of flash is playing it as parcel media but that specifically doesn't allow interactivity if I remember correctly. Most importantly in SL mouse-over has no effect on anything but the viewer tooltips/ :-) Otherwise I might be able to suggest using particles Link to comment Share on other sites More sharing options...
Darkie Minotaur Posted April 20, 2012 Share Posted April 20, 2012 I'm honoured but can't really add anything to what Peter has already said. But then again, it's no surprise that I can't anything beyond Peter's wisdom! Link to comment Share on other sites More sharing options...
Innula Zenovka Posted April 21, 2012 Share Posted April 21, 2012 I got it to work by changing // html = "data:text/html," + llEscapeURL(html); // you may need to escape funny chars html = "data:text/html," + html; // or not, this depends upon your URL's to html = "data:text/html," + llEscapeURL(html); // you may need to escape funny chars // html = "data:text/html," + html; // or not, this depends upon your URL's It's great! ETA -- you have to left click the water first, and then move the mouse pointer round. Link to comment Share on other sites More sharing options...
Rolig Loon Posted April 21, 2012 Share Posted April 21, 2012 Oh, wow! That is so cool. I learned something today. :smileyhappy: Link to comment Share on other sites More sharing options...
PeterCanessa Oh Posted April 21, 2012 Share Posted April 21, 2012 Well done for working it out Innula. And well done Jeffrey for bringing it up. Link to comment Share on other sites More sharing options...
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