Jump to content

Gregory McLeod

  • Posts

  • Joined

  • Last visited

Everything posted by Gregory McLeod

  1. Thanks for the suggestions. I have strayed a little from my original question but I think I have enough to be getting on with.
  2. That kldgy technique certainly has merit but there are other criteria would have to be set before restting. Its a question of maintaining the security of both the prim and it's scripts and a website link password. I am sure I can work round that with come obfuscating embedded data fields. I think I prefer the former investigative approach and then correct the script. The problem is the unpredictablity of the changes to stack or heap within the script. Time will tell by investigating where the memory is being absorbed. I want to avoid if possible the problem of multiple llOwnerSay(...) function calls as the limit is the storage available in the first place is tight. I have already split the original script into 2 scripts containing like facilities together UI and External comms.
  3. mikka Luik wrote: Snip If that meant a week of sitting up testing stuff before releasing it into the wild it was well worth it. But what do you do if after weeks of testing which have never resulted in a stack-heap collision to find out what causes it in real use? Can you monitor memory sufficiently often enough and report on your findings without causing a stack-heap collision?
  4. I agree the correct solution is to rewrite the script. However that brings up a further question what do you change in a script that causes stack-heap collisions rarely enough to never do it while testing. Can you suggest a way to determine what is causing the stack-heap collision?
  5. I know that you cannot reset a script from another script unless it is running. Maybe I was not clear in what I want to achieve. There is a build function which allows you to recompile all the scripts in a prim but not one which selectively recompiles just one script, am I right? The problem is your solution requires someone , usually me, to go online and reset or recompile the scripts which given SL 24x7x365 could mean any time and I object to getting up at 2am on a Sunday. Thanks anyway
  6. I have a problem with a prim which contains many scripts. Occasionally one of the scripts will get a stack/heap collision and stop the script. Is it possible to reset the failing script and leave the others running?
  7. DUH! Too long c oding session!
  8. I am trying to develo a user function which will give me the indices of a specific string in a source string. I keep getting a problem with variable not being defined within scope. I paste the c ode for the complete function tester script. string Source1 = "XbcdefghijklmnopqrstuvwxyX"; string StrInStrIndex(string psSrc,string psArg,integer piNum) { integer liIndex; integer liSrcLen; string psSrcTemp; list laFound; if (llSubStringIndex(psSrc,psArg) == -1) { return "-1"; } liIndex = llSubStringIndex(psSrc,psArg); llSay(0,"liIndexA: " + (string)liIndex); liSrcLen = llStringLength(psSrc); llSay(0,"liSrcLenA: " + (string)liSrcLen); if (liIndex == (liSrcLen -1)) { return (string)liIndex; } laFound = []; llSay(0,"laFoundA: " + llList2CSV(laFound)); laFound += [liIndex]; llSay(0,"laFoundB: " + llList2CSV(laFound)); if ((liIndex == 0) & (liSrcLen == 1)) { return llList2CSV(laFound); } else { psSrcTemp = llGetSubString(psSrc,(liIndex + 1), -1); llSay(0,"psSrcTempA: " + psSrcTemp); do { integer liSrcLen1; llSay(0,"Start DO loop"); liScrLen1 = llStringLength(psSrcTemp); llSay(0,"liSrcLen1A: " + (string)liSrcLen1); if (liSrcLen1 == 0) { return llList2CSV(laFound); } else { liIndex = llSubStringIndex(psSrcTemp,psArg); llSay(0,"liIndexB: " + (string)liIndex); if (liIndex == -1) { return llList2CSV(laFound); } else { laFound += [liIndex]; llSay(0,"laFound: " + llList2CSV(laFound)); psSrcTemp = llGetSubString(psSrcTemp,(liIndex + 1),-1); llSay(0,"psSrcTempB: " + psSrcTemp); } } } while (liSrcLen1 > 0); } return llList2CSV(laFound); } default { state_entry() { llSay(0, "Hello, Avatar!"); } touch_start(integer total_number) { string Result; llSay(0,"Source1: " + Source1); Result = StrInStrIndex(Source1,"X",-1); llSay(0,"Result1: " + Result); } } Can anyone tell me what I am doing wrong?
  9. Two prims won't talk to each other. They will respond to external chat but not their own. PRIM 1 integer ComChannel = 99; integer listenHandle; default { state_entry() { llOwnerSay("Hello, Avatar!"); llOwnerSay("I am Prim 1."); listenHandle = llListen(ComChannel, "", llGetOwner(), ""); } touch_start(integer total_number) { llOwnerSay("Touched."); llOwnerSay("I am Prim 1."); llWhisper(ComChannel,"test from Prim 1."); } listen(integer channel, string name, key id, string message) { llOwnerSay("Message received on\n" + (string)channel + "\n" + name + "\n" + (string)id + "\n" + message); } } and PRIM 2 integer ComChannel = 99; integer listenHandle; default { state_entry() { llOwnerSay("Hello, Avatar!"); llOwnerSay("I am Prim 2."); listenHandle = llListen(ComChannel, "", llGetOwner(), ""); } touch_start(integer total_number) { llOwnerSay("Touched."); llOwnerSay("I am Prim 2."); llWhisper(ComChannel,"test from Prim 2."); } listen(integer channel, string name, key id, string message) { llOwnerSay("Message received on\n" + (string)channel + "\n" + name + "\n" + (string)id + "\n" + message); } } What have I done wrong?
  10. Is there any rate limit set for llRegionSay NOT ion the debug channel? I know there is a rate limit for the debug channel but what about random negative channels?
  11. Thanks, Just asking. I will tackle the problem another way compiling a list of the messages and sending when the limit (1023) is reached or a time has expired.
  12. I have a prim from which I want to send to my email address a number of messages relating to events external to the prim. When an event is detected I have used the llInstantMessage to send a message to myavatar. If I am not currently logged in it will send these IMs to my email address. The example below shows the principle. string Gregory_McLeod = "key of avatar Gregory McLeod"; integer IMCounter = 0; default { state_entry() { llSay(0, "Hello, Avatar!"); } touch_start(integer total_number) { llSay(0, "Touched."); IMCounter++; llInstantMessage(Gregory McLeod,"test message number " + (string)IMCounter + " sent at " + "time coding"); } } What my question is can the format of the emailed IM by modfied. What I get by email is The object <primname> has sent you a message from Second Life: test message number 1 sent at <timestamp> = <primname> is owned by Gregory Mcleod = http://slurl.com/secondlife/<location of prim> The object <primname> has sent you a message from Second Life: test message number 2 sent at <timestamp> = <primname> is owned by Gregory MLeod = http://slurl.com/secondlife/<location of prim> and so on with multiple entries in aone email Can the messages about the primname owner and its location be removed?
  13. Thanks to you both for insights innto solving the problem. Question along the same lines you mention the arrangement of global variables and constants. Is there any point in arranging the different types of variables/constants together? Integers/floats/vectors/keys/rotations/lists/strings or some other order. I do not know how the Mono compiler orders these things in memory. Can space be saved?
  14. How do you solve stack/heap collisions? I was just adding the last little bit to my HUD and BANG. How do you go about it I have already split the two scripts into 3. I do have a lot of verbiage llOwnerSay 's but is there a good methodology for fixing them?
  15. PROBLEM SOLVED The creator of the prim that wouldn't rezz a ball for me replaced the prim and it now works. Don't ask what was different he swears there were no changes. But.... Thanks for all the help
  16. Now that sounds much more like it. Can you be more specific, what is doing the blocking and how is it removed or stopped?
  17. I now have the scriot and there is no possibility that it should fail the script in response to a touch checks a state value which I know is set. And calls a function. The function does llRezObject(gsBallName, llGetPos() + gvRezzOffset,gvRezVelocity, ZERO_ROTATION,1); as others can do it it must be working OK but just not for the one avatar. any more thoughts.
  18. The response to the touching is supposed to be the rezzing of a Ball. No ball is rezzed. Thanks for the thought.
  19. This is an unusual event. A prim with an embedded script responds to one avatar but not another. The avatar getting the failure can build a new object put a script in it and it will respond to the appropriate touch_start event. Now the prim which is failing to respond was created by another avatar but is supoposed to have no restrictions in it as to who it will respond to. Is there any way an avatar can be prevented from getting a response from an object? I have heard of a block list but can it do this?
  20. I panicked sorry it is in my Trash and has been recovered Thanks
  21. I have accidentally deleted one of my Inventory Folders. is there any possibility of recovery?
  22. To Innula, I have tried the modified script and it worked intermittently. If the hud was rezzed on the ground it worked if it was the detached and worn it did not work. I have made on addition to the scripts in the first I have put a sleep for 5 seconds in at the point where it is about to send the S5ChecksComplete message. This solved the problem. I now have a HUD which will if rezzed on the ground ask for permission to attach, take controls and animate. It will also if worn in the correct place do the same correct actions. It will also survive logging off while it is still ayyached and correct;y operate when the avatar logs in again. All the llOwnerSay message have been recorded and could be shown as proof but I do not want to clutter thias thread with them when the problem is solved. Incidentally a sleep of 2 seconds was not enough. Thanks to all who helped, read but did not contribute. These forums are a major reason why I keep doing this..
  23. That is a very thoughtful posting LepreKhaun. To address some of the points. <quote>When one decides there is a need for multiple scripts to accomplish the task at hand, whether to circumvent the restrictive memory requirements we must work within, a (possibly unjustified) need for modularization of components or whatever; they will be faced with a number of obstacles. The primary obstacle is that, at it's most basic level, LSL is NOT a synchronous paradigm.</quote> I would refer to a previous post of mine on the subject , if I could find it, in which one of the respondents advised that the function of the HUD scripts needed to be segregated. Animation and control separate from UI. This was the original designers approach but I am being tasked with modifying it to accomodate additional functions. These functions are to offload a central prim which is overloaded by multiple users requesting service and honor the requests from the individual's HUD. My initial attempt at this kept the original designer's two scripts but ran into the inevitable stack/heap collision. This led to the three script solution. <quote>That's all well and good, but this has to do with design and architecture. If the overall thought behind the structure as a whole is beyond the capabilities of the platform one is trying to implement it on, one needs to re-address either the need for that capability (Do these programs actually need to synch up in this way?) or rethink the basic premise of the requirements (Are multiple programs actually required to solve the problem at hand?).</quote> The third script, the one that is the subject of this post, is not the complete script it has been reduced to the minimum to enable the testing of the whole. You make mention of the capabilities of the platform. What do you suggest I do about that? I submit that I am working within the capabilies provided by LL I cannot change that, what I can do is get the best available brains to help me resolve the problems which is what I am doing. Thanks for your input.
  • Create New...