Jump to content

Lilac Melodious

Resident
  • Posts

    7
  • Joined

  • Last visited

Reputation

2 Neutral
  1. Thanks! That worked. This was done late at night and I only just got around to testing it. lol
  2. Alright, here I am again with an odd issue. I'm working on a script that rezs an object on keyword, for roleplay purposes. I keep getting a compile error from the internal server. I have looked at a few topics and have tried a few sims, both on the main channel, one a homestead, and the other being the mainland. Nothing new, but largely in-progress, and i stopped at object_rez to test to see if it compiled, hence why it's commented out here. Here's the script: //////////// ////VARS//// //////////// key id = llGetOwner; string trgr = "poops"; // Word to trigger. string objName = "test"; // Name of the object to be rezed. //integer lstChannel = 4; // Channel to listen for the trigger word on integer mem = 32768; // Memory limit for the script. integer lstHandle; //----------// start(integer inputInteger) { lstHandle = llListen(4, "", id, trgr); llSetMemoryLimit(inputInteger); llOwnerSay("Script has started."); llListen(4, "", id, ""); } orez() { llOwnerSay("Object is rezzed. Restarting."); llResetScript(); } default { state_entry() { start(mem); llGetAttached(); if (llGetAttached() != 40) { llOwnerSay("Please add me to Avatar Center before use."); } } listen(integer channel, string name, key id, string message) { if (message == trgr) { llRezAtRoot(objName, (vector)llGetPos(), ZERO_VECTOR, ZERO_ROTATION, 1); } } /*object_rez(key id) { ; } */}
  3. Alright, I have tried without those before before posting, but that was also before I found some late-night typos within the script in various parts.
  4. Thought I had added the problem in the main post, I'll get that added after this. The issue revolves around the response from the llDialog command, which is set up as it should. Either the llListen call is somehow messed up without me knowing, as the if/else logic is mostly being ignored, besides the main and cancel buttons.
  5. You can use a very simple rotation script to rotate the object, keeping the root prim static while everything else rotates beyond the screen, given the script is in the root prim.
  6. Evening everyone, I've recently ran into a problem creating the following script. The else/if logic is mostly unresponsive, other than the main and cancel segments. No llRegionSayTo calls (or even llSay) are being executed. See below; //=================================// //============Variables============// //=================================// integer gListener; //Don't change integer dialogChannel; //Don't change integer dialogHandle; //Don't change integer rstChannel = 99; //llRegionSayTo channel for communication to the slave scripts. integer mem = 16384; /*Reccommended value 16384; Lower values may not work, causing the script to take 64k (65536) instead of your limited amount, or to shout "Stack Heap Collision".*/ string abrv = "\nWhat part would you like to hide?"; string abrvA = "\nWhat arm would you like to hide?"; string abrvA1 = "\nWhat would you like to do with 'RightArm'?"; string abrvA2 = "\nWhat would you like to do with 'LeftArm'?"; string abrvC = "\nWhat would you like to do on 'Chest'?"; string abrvW = "\nWhat would you like to do on 'Waist'?"; //string abrvL = "\nWhat leg would you like to hide?"; list menuSelect = ["Chest", "Arms", "Waist", "Cancel"]; list menuSelectA = ["Show RArm", "Hide RArm", "Show LArm", "Hide LArm", "Main"]; list menuSelectC = ["ShowC", "HideC", "Main"]; list menuSelectW = ["ShowW", "HideW", "Main"]; //list menuSelectL = ["Right", "Left", "Main"]; key id; /* =================================== ===========STATE CONFIG============ =================================== */ memory() { llSetMemoryLimit(mem); llOwnerSay("DEBUG; MEMORY: "+(string)llGetUsedMemory()+" used of "+(string)llGetMemoryLimit()); } open_menu(key inputKey, string inputString, list inputList){ dialogChannel = (integer)llFrand(DEBUG_CHANNEL)*-1; dialogHandle = llListen(dialogChannel, "", inputKey, ""); llDialog(inputKey, inputString, inputList, dialogChannel); llSetTimerEvent(45.0);} //Time in Seconds before listen timeout. close_menu(){ llSetTimerEvent(0); //0 is used here in place of 0.0 to save memory. llListenRemove(dialogHandle);} /* =================================== ===============CODE================ =================================== */ default{ on_rez(integer start_param){ llResetScript();} state_entry(){ memory(); llOwnerSay("DEBUG: Memory allocated; Script booted."); llOwnerSay("I'm in JoMo Griffin mode...");} touch_end(integer total_number){ key id = llDetectedKey(0); //Find who touched me. //key id = llGetOwner(); llListen(dialogChannel, "", llGetOwner(), ""); close_menu(); //Destroys my active ears. open_menu(id, abrv, menuSelect);} listen(integer channel, string name, key id, string message){ //if(channel != dialogChannel) //return; //close_menu(); if(message == "Chest") { open_menu(id, abrvC, menuSelectC); return; { if(message == "ShowC") { llRegionSayTo(llGetOwner(), 99, "topon"); } else if (message == "HideC") { llRegionSayTo(llGetOwner(), 99, "topoff"); llOwnerSay("touched.."); //debug, where the problem was noticed. } return;} } else if (message == "Arms") { open_menu(id, abrvA, menuSelectA); { if (message == "Show RArm") { llRegionSayTo(llGetOwner(), 99, "armRoff"); } else if (message == "Hide RArm") { llRegionSayTo(llGetOwner(), 99, "armRoff"); } else if (message == "Show LArm") { llRegionSayTo(llGetOwner(), 99, "armLoff"); } else if (message == "Hide LArm") { llRegionSayTo(llGetOwner(), 99, "armLoff"); }return; } } else if (message == "Waist") { open_menu(id, abrvW, menuSelectW); { if(message == "ShowW") { llRegionSayTo(llGetOwner(), 99, "waiston"); } else if(message == "HideW") { llRegionSayTo(llGetOwner(), 99, "waistoff"); } return;} } else if(message == "Main"){ open_menu(id, abrv, menuSelect); return;} } timer() { close_menu(); } } To answer any common questions, yes, I am on land that has scripts enabled, and it does compile. I've also read around on some similar problems on here. If anyone can help out, that'll mean a lot! Also, this is interfacing Alpha slave scripts, which I've already checked, and tested in local using /(channel)(message) format, like everything else, as well as using with other scripts like togglers that also use llRegionSayTo. they indeed work.
×
×
  • Create New...