RainConner Posted December 22, 2020 Share Posted December 22, 2020 I am working on a simple script, it's not too complicated but for some reason I keep getting an error. I am learning scripting a tad bit, simple easy things, so I am a bit lost. I have checked and checked and I for the life of me can not figure out what I am missing. Help please? And Yes I am aware it will most likely be the smallest mistake ever. I am just missing it. default { state_entry() { llSay(0, "Let’s Get Ready to Hunt!"); } touch_start(integer total_number) { if (llDetectedGroup(0) ) //same as llSameGroup(llDetectedKey(0) ) (with llSameGroup, detected must be in the sim) llGiveInventory(llDetectedKey(0), llGetInventoryName(INVENTORY_TEXTURE, 0) ); { key id = llDetectedKey(0); // send a message to the chat window of the avatar touching llRegionSayTo(id, 0, "You touched this!"); else { llSay(0, "Wrong active group!"); } } Link to comment Share on other sites More sharing options...
Emma Krokus Posted December 22, 2020 Share Posted December 22, 2020 try this: default { state_entry() { llSay(0, "Let’s Get Ready to Hunt!"); key id = llDetectedKey(0); } touch_start(integer total_number) { if (llDetectedGroup(0) ) //same as llSameGroup(llDetectedKey(0) ) (with llSameGroup, detected must be in the sim) { key id = llDetectedKey(0); llGiveInventory(llDetectedKey(0), llGetInventoryName(INVENTORY_TEXTURE, 0) ); // send a message to the chat window of the avatar touching llRegionSayTo(id, 0, "You touched this!"); } else { llSay(0, "Wrong active group!"); } } } Link to comment Share on other sites More sharing options...
Rolig Loon Posted December 22, 2020 Share Posted December 22, 2020 Well, you're missing one closed } bracket. It's an easy, common mistake, one that many of us never grow out of completely. That also means that it's easy to anticipate. Then you give yourself a dope slap and move on. The editor should point to exactly where it expects to see the missing bracket, but the easiest way to avoid the error in the first place is to be very careful about indenting your text so that you can see where each scope within it begins and ends. You might also try using a more sophisticated editor, like Sublime Text, that generates matching brackets automatically. 1 Link to comment Share on other sites More sharing options...
RainConner Posted December 22, 2020 Author Share Posted December 22, 2020 THANK YOU! THAT DID IT! 1 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