Jump to content

PeterCanessa Oh

Resident
  • Posts

    4,476
  • Joined

  • Last visited

Everything posted by PeterCanessa Oh

  1. There is no official minimum height requirement although most (?) rentals include a 200-250m minimum in the covenant. That's individual to the parcel, of course.
  2. A timely post, I was wondering today what on earth they were for. The development team seem to be moving to web-based everything for greater flexibility and to make re-skinning, for instance, easier. Fine, but I thought the point of the v2 interface was that it allowed that freedom - or was going to 'any day now'. Meanwhile, like a lot of things, LL have said that web-profiles are a work-in-progress and that this is only the first iteration of them. Just hope some reason for the change becomes apparant at some point and that it isn't "so we can put facebook and twitter on it".
  3. Serunus wrote: Alright, but what about other cases? Such as phishing and copying virtual merchandise? Would these usually just get reported straight to Linden Labs? Both would probably be AR'd, copying would require a (RL) DMCA takedown notice and can only come from the original creator. Neither would be reported to any vigilante group - what could they do about it? Probably a DDOS attack or a mass griefing, which is what gets them such a bad name in the first place.
  4. Rolig Loon wrote: It does help to have the debate in the open occasionally, though, especially for the benefit of those who haven't made up their minds yet. You are allowed to use both at different times you know, lol. Yes, pre- and post-decrementing and the whole loop-counter/conditional testing stuff is where we have to start applying the 'logic' of programming but, "bleh", I don't go much for "properly-trained profesionals". Too many I've met have taken that to mean "these are the rules and you have to stick to them, or else". I'm too pragmatic for that which is why I tend to avoid questions of style. Make it work, make it readable, make it efficient - in that order and stop when you've had enough. [Of course, even that is arguable but I'm not dogmatic about it]. I should, perhaps, explain why all this stuff relates to the OPs original script and why I pointed out the indexing error in the first place - touch_start(integer numberofagentstouching) { list items = []; integer numberofitemsincontents = llGetInventoryNumber(INVENTORY_ALL); do { string name = llGetInventoryName(INVENTORY_ALL, numberofitemsincontents); if (name != llGetScriptName()) items = (items = []) + items + [name]; } while (--numberofitemsincontents >= 0); llGiveInventoryList(llDetectedKey(0), llGetObjectName(), items); } (Assume 'Object' and 'This Script' are the only thing in the prim's inventory): llGetInventoryNumber(INVENTORY_ALL) gives the answer 2 First time through the loop llGetInventoryName(INVENTORY_ALL, 2) gives an empty string and no error (http://wiki.secondlife.com/wiki/LlGetInventoryName) because the indices are only 0 and 1, there is no 2. As the empty string is not the same as this script's name it is added to the list of items. Second time through the loop llGetInventoryName(INVENTORY_ALL, 1) gives 'This Script', which is not added to the list Third (last) time through the loop 'Object' is returned and added to the list. So the list is now ["", "Object"] As "" (the empty string) is missing from the prim's inventory then llGiveInventoryList() shouts an error on the DEBUG_CHANNEL (http://wiki.secondlife.com/wiki/LlGiveInventoryList) Now since most people don't see or hear script errors and neither of the errors with these indices stops the script it doesn't really matter if we ignore them. :-) I didn't think that was the case for people reading this forum though :-)
  5. Adromaw Lupindo wrote: What was unfathomable thing about the delay? Beats me, that's why I said it was unfathomable. See, for instance, that llSetPrimitiveParams() and llSetLinkPrimitiveParams() halt the script for 0.2s, as do most of the individual prim-editing things. I wasn't around for the 'whys' of this either. Maybe Kelly or one of the older residents will respond, although I suspect the decision is lost in the mists of time.
  6. The 'old' way to do things is to use llSetPrimitiveParams(), which lets you set all sorts of things at the same time http://wiki.secondlife.com/wiki/LlSetPrimitiveParams Most of the individual prim-editing functions have a built-in delay, for some unfathomable reason, which caused all sorts of awkward work-arounds. LL - hoorah for Kelly :-) - gave us a new function in the 'efficient scripts' project: llSetLinkPrimitiveParamsFast() will do the same things as llSetPrimitiveParams() but lets you do it to any prim in the link-set and has no built-in script delay. This last means it's even worth using it 'just' on the current prim: llSetLinkPrimitiveParamsFast(llGetLinkNumber(), [... rules ...]); http://wiki.secondlife.com/wiki/LlSetLinkPrimitiveParamsFast
  7. @ EnCore - don't worry, my comments were mainly aimed at the other people who use the forum, not you and other neophytes. The main problem is that I can't point at Rolig's code and say, "See this bit? I think it would be better like this". If I'd (re)posted) the code from Rolig's post you wouldn't be able to tell which lines I was talking about, especially as the highlighting options I have seem to be extremely limited [read 'non-existent'] or at least it looks that way on my screen. Lol, not that you can tell what I'm talking about now apparently. Ah well, at least I can help you with post decrementing :-) 'Decrement' means "To decrease a value" (according to the dictionary - the opposite is "increment") "X = X - 1;" subtracts one from a value (decrements it by one) So does "X -= 1;", it's just a shorthand-notation way of doing the same thing "--X;" also decrements X by one - it is pre-decrement (see below) And finally: "X--;" is yet another way of taking-away one from a value. It is 'post decrementing' The big difference between those last two and the others is that they are 'meant' to be used in conditions, loops, etc. (although there's nothing stopping you using them on their own or using the other notations in their place, it's just shorthand gibberish). "--X;" means "Take away one and use the result" (hence decrementing pre/before the operation) "X--;" means "Use the value as it is then take away one" (hence decrementing post/after the operation) Soooo ... in a while loop with a counter initialised to, say, 10 you could have: while(numberofbottles){ llOwnerSay("There were " + (string) numberofbottles + " green bottles, standing on the wall"); numberofbottles = numberofbottles - 1;} to count from 10 down to 1 inclusive. It will stop BEFORE printing 0 because that's the same as FALSE and fails the while test. You can get rid of the line that decrements the counter in a few ways. I'm just going to show the difference between pre- and post-decrementing (numberofbottles still starts at 10): while(--numberofbottles){ llOwnerSay("There were " + (string) numberofbottles + " green bottles, standing on the wall");} This pre-decrementing "takes away one and uses the result". Because of that the first time the while-condition is tested numberofbottles is 9. The test still fails for 0, so this loop only prints from 9 down to 1 inclusive. For the loops that you've been using to go through inventory you need to go through all (10) things in inventory but their numbers should be 0 - 9, not 1 - 10. So, finally, post-decrementing: while(numberofbottles--){ llOwnerSay("There were " + (string) numberofbottles + " green bottles, standing on the wall");} "Use the value then take away one" - the test first 'sees' 10, but the line inside always uses one lower. On the final successful loop the test has 1 and makes that 0. Which means that this is a simpler way to print 9 down to 0 inclusive even though your original counter (such as number of things in inventory) runs 10 to 1. This is just what you need to access everything in inventory using llGetInventoryNumber() or in a list using llGetListLength(). Good luck. Hope that didn't hurt too much. Don't worry about it too much, we all started the same way, (Most) confusion is caused by the fact that different posts in the forums addess different audiences.
  8. mbmadiw wrote: Is it possible to set up a private area only for students at our school to visit? Must it be done by purchasing land ($1000 + $295/mo) or is there another way? Yes, it's possible. No, you don't have to pay US$10,000 + US$295/month for land, there are many other ways: The price quoted is for a complete sim. You can buy, or rent, land in any size, not just 256x256m Linden Lab are offering sims for rent for just a day or two so commercial/educational organisations don't have to pay the setup and monthly fees. You can download and install OpenSim or similar on your own server for free. That will allow you to run your own "SL" completely private to your students. Linden Lab will sell you the 'Enterprise' version of SL for several thousand US$. It's like OpenSim but costs more. With any of these options you have to consider how you will build and decorare the area. Except for option 2 you basically get a bare bit of land. You'll probably need a building, textures, scripted objects, etc. depending on what you'll be using the area for.
  9. Baloo Uriza wrote: I could be wrong, but I've interpreted anything past the height of banline effectiveness to be communal Linden airspace, as people piloting air vehicles are generally unable to see property lines at ground level and are usually just passing through at a relatively high rate of speed. I agree for temporary transit purposes, especially as no-object-entry keeps out unmanned things. This is permanent prim encroachment though. When the root of the object and the prim-count stays on the neighbours parcel it can be possible to make a 'shared space' agreement with them - they get, say, 1000m - 2000m, you get 3000m - 4000m. In that range you can extend into (but not place prims in) the other person's parcel area. Not applicable anway in this case, since the OP wants to skydive through the height range.
  10. The location and re-texturing options for Linden Homes are quite limited, you are also not allowed to change the build or have a skybox. LL were none too quick to react when a number of people were locked out of their homes through some script/sim fault either. In contrast the big attraction for the Linden Homes is that the house itself does not count against your prim-allowance. The limitiations make sense for complete newbies but since you're past the initial learning-curve (I assume) you may prefer the greater flexibility of buying any 512sqm (rent-free as it's included in the premium account fee) and having the build of your choice.
  11. /me beats Pep to it ... OMG, IIRC, OIC, etc are not acronyms. Acronyms are pronounced as words; radar, laser, NATO, etc. [Courtesy of the pedants' society. Please mind the apostrophes] (Hehe, Pep missed the typo too!)
  12. I don't generally like discussions of coding style because they tend to come down to personal preference and what you're used to. I think I have to point out again though that using the post-decrement (--) operator in your loop conditions can make things a lot simpler. With everything but the relevant instructions removed Rolig has this: while (numberofitemsincontents) { string name = ...(..., numberofitemsincontents - 1); ... --numberofitemsincontents; } }... while (len) { ... integer idx = ...(...,[...(...(...,len-1))]); ... llOwnerSay(...(...,len-1) + ...; llGiveInventory(...,...(...,len-1)); --len; } Now, whatever works is good and I personally think it's more important to write clear code for maintainability than get the last ounce of performance out of everything. Specifically, though, I think it's easy to miss one of those '-1's that are needed if you're keeping the loop condiition variable as is. My recommendation is to decrement it straight away, then you don't need to keep adjusting it later: while (numberofitemsincontents--) { string name = ...(..., numberofitemsincontents); // <- Simplified ... // --numberofitemsincontents; <- No longer required } }... while (len--) { ... integer idx = ...(...,[...(...(...,len))]); // <- Simplified ... llOwnerSay(...(...,len) + ...; // <- Simplified llGiveInventory(...,...(...,len)); // <- Simplified // --len; <- No longer required } Everything's a trade-off, of course so there may be times when your loops are using the original value so you can't use this technique. You may also believe it is harder to read so just don't like it. That's fine, getting a script to work in the first place is the important thing!
  13. As you don't say what your problem is we can't tell you what you are doing wrong
  14. Unfortunately llGiveInventory() doesn't let you specify a destination folder, so each item goes wherever SL feels like putting things of that type :-( (set click-action to 'open' and let the new owner click 'copy to inventory', that works even for no-copy. You don't need a script at all for that, even if it is less fun)
  15. There's a bigger problem with the script ... typing proper answer offline. I'll edit this post when it's done. Edit: default{// If it's empty there's no point in having this here at all state_entry() { }// So just delete it touch_start(integer numberofagentstouching) { list items = []; integer numberofitemsincontents = llGetInventoryNumber(INVENTORY_ALL); // NB: This will tell you, for instance, that there is ONE thing in inventory... do { // ... but the FIRST thing is index ZERO, not ONE string name = llGetInventoryName(INVENTORY_ALL, numberofitemsincontents); // So the line above will start at one more than it should and return an empty string if (name != llGetScriptName()) items = (items = []) + items + [name]; } while (--numberofitemsincontents >= 0); // The empty string will cause a run-time error when this line tries to find it in inventory llGiveInventoryList(llDetectedKey(0), llGetObjectName(), items); // (Apart from your no-copy issue) // To cure it I'd use an ordinary while() loop instead of do...while() // First check if there is an(other) item and decrement the counter // while(numberofitems--){ ... } }}
  16. Rolig Loon wrote: Nope....so SL isn't going to be around long enough to hit that limit. Hehe, very true. Just in case it were though - note that the timer KEEPS going off every X seconds so you can set it once and have a global variable keep a count of how many times it's been triggered. Not too useful for measuring periods of over 60 years but it can be very handy for a multi-use timer. IE; you may have something your script needs to do every second, so you llSetTimerEvent(1.0); Fine, until you also need to do something every 10 seconds. You can only have one timer per script, so what do you do? timer(){ ... 1 second stuff ... if(!(++TimerCounter % 10)){ ... 10 second stuff ... }} And so on for any other intervals you need. (NB: it is much more efficient to always set the slowest timer you can, so don't set a 1-second timer just so it can count to 10!) On the other hand - if you were asking about how long things survived before AUTOMATICALLY being deleted, that's TEMP_ON_REZ and you can't set it; it's "about 1 minute" until SL's garbage collector comes around and removes it.
  17. Coppurr wrote: My first day was yesterday.... Get to NCI and ask about everything! Search for NCI or, possibly, 'New Citizens Inc'.
  18. varrich Steamweaver wrote: keep coming up wtih syntax error when i code them. I fear that i am really really lost. Can anyplease help me work this out...i would really appreciate it.... Right, "syntax error" is better than "can't get it to work". It means you've typed something wrongly or missed something out and the compiler just can't understand the script. To work it out ... correct the mistake on the line it tells you. Now ... if you want some more specific advice - POST THE CODE you have so we can see what is wrong!
  19. No, you're right, polling is the only way to do it. That's the trouble with most AOs too; they have to keep polling for what animation SL 'would' be playing if they didn't override it. In exactly the same way it would be nice if this was an event too, but it isn't.
  20. varrich Steamweaver wrote: my problem is i am very very new scripting...i i can not seem to get it to work.... please help me I CAN get it to work, it won't actually help you that much just to give it to you though, and I haven't got time to write it now. Tell us WHAT you are having trouble with rather than "I can not seem to get it to work" and we can explain how to go about it. We all started the same way, don't worry about it. When you're starting though this is not "a basic script". It gets complex because you want it to ... and ... and ... Take it one function at a time and build it up slowly. Simplest function in your list is die-after-n-seconds: in your default state_entry() put llSetTimerEvent() to set the timer for how long you want. Add a timer() event-handler and put llDie() in there. http://wiki.secondlife.com/wiki/State_entry, http://wiki.secondlife.com/wiki/LlSetTimerEvent, http://wiki.secondlife.com/wiki/Timer, http://wiki.secondlife.com/wiki/LlDie Test it, debug it, test again, repeat ... ask again if you need to. ... Next thing to look at will be making a menu selection. Call us back when you're ready, we'll be here :-) (http://wiki.secondlife.com/wiki/LlDialog, http://wiki.secondlife.com/wiki/Listen, http://wiki.secondlife.com/wiki/LlGiveInventory - although you've already said you're fine with that one) [i really mean it about building-up slowly. Programs (scripts) can get very complex but they are never complicated; computers are too dumb to do complicated things] ============================================================================ Your duplicate thread: http://community.secondlife.com/t5/LSL-Scripting/lldie-for-a-noob/m-p/763541/message-uid/763541#U763541 has more posts so I'll ignore this one and answer there from now on
  21. Click 'forums' above this thread. Scroll down. Look! A whole section for "Buy And Sell Land"
  22. Rhonda Huntress wrote: I am not a premium member. I am a "freeloader" like much of SL. And still I would support a no pay no play policy like we had from start. If only there were a way to PAY Linden Lab, they don't seem to want any money.
  23. 30th March 2007. Logged-in at Orientation Island (I think) where you had to go through learning to move, chat, and a couple of other things before you were allowed to enter the wider-world. I lesrnt to move, I learnt how to chat (both pretty standard, I thought), SL crashed. When I logged-in again I was at some welcome area, packed with unmoving, unspeaking avatars and I was on top of a pile at the rez point. Very laggy, very hard to get off the pile. SL crashed. A couple of days later I tried again. Welcome area was still awful and about as unwelcoming as it was possible to imagine. Lost. Now what? Tried moving - soooo slow - tried chatting - no response from motionless avatars. Got away from the crowds and looked at some of the signs around. It was easier to move away from the crowd! There were people chatting - although only amongst themselves. Still no idea how to do anything interesting or even how to find out what interesting things there might be to do. Found an advert/LM-giver for NCI. Saved :-)
  24. A classic of our times. And your comments on the idea of regional weather? (Come on, if you know Michael Fish you must be British and that means you'll always talk about the weather)
×
×
  • Create New...