User talk:Daemonika Nightfire

From Second Life Wiki
Revision as of 18:29, 11 November 2012 by Fred Gandt (Talk | contribs)

Jump to: navigation, search

Wikipage rollback

Hi, I'm not sure why you rolled back User:Daemonika_Nightfire/Scripts/Anti_copy_trans. I didn't change any functionality but mainly changed state and variable names to something more descriptive and added a comment here and there. -- Kireji Haiku 13:56, 1 November 2012 (PDT)

Hello, first sorry for my bad english. I rolled back, because that what you do with my script is not what i want and not my style. Your version was not that what is writen on top of the Script "by Daemonika Nightfire". If you want other version make a own page. Additionally i never want the on_rez event at first in a script. -- User:Daemonika Nightfire
Ok, that's fine. The reason I put on_rez in front of state_entry is because of Event_Order. -- Kireji Haiku 14:20, 1 November 2012 (PDT)
You know thats LSL an event based script language is? Because that it's not necessary where is an event placed in a script and the Event order Page is not god and not written by Linden Lab. I always sort the events by priority. That means when an event is not often be trigegred or just contains low priority funktions i move it down. In my scripts are ever the state_entry the first and on_rez the last. -- User:Daemonika Nightfire
I too had my scripts altered by Kireji, and am not even slightly happy about it.
Not good wiki etiquette!! Not at all.
fredgandt 00:15, 2 November 2012 (PDT)
Sometimes i get requests about my scripts for help, but i cant support when i have to learn my own script first.
And variables like this "foundOwnerKeyInListOfCreatorOrResellerKeys" are not more readable, no that's <censored> and needs more memory.
I am not happy about this. -- User:Daemonika Nightfire 14:50, 2 November 2012 (GMT)
I totally agree. That's one hellish var name! I purposefully add comments to many of my scripts to help others understand them, and Kireji decided to eliminate quite a lot. And like you say; I don't want to have to learn how my scripts work if I am asked about them.
At least one script he changed deals with PERMISSION_DEBIT and I am responsible for it functioning correctly (as I wrote it). I can't allow it to be published on my page without my being sure of it's functionality. Even if a script I wrote is crap, it's my crap!!
Regardless of the reasons we may not like what Kireji did, he simply shouldn't do it. Wiki user pages are off limits without express permission. On Wikipedia (the daddy wiki), not even admin will change user pages without discussion first (unless there's a breach in ToS).
 fredgandt 08:39, 2 November 2012 (PDT)
Ok, folks. I didn't know the user pages are off limits, I'm sorry. No offence intended, neither express nor implied. However I do disagree with the readability of scripts. Variable names should make clear what the values stored are used for and if there is a constant for the same value that makes sense, it should be used. Anyhow, I won't edit the userpages again. -- Kireji Haiku 10:04, 2 November 2012 (PDT)
Kireji may promise not to do it again, but they did not roll back their changes to my pages, nor let me know they were going to, so I did my own rollbacks. What a pain in the (censored). Toady Nakamura 10:18, 4 November 2012 (PST)

Your script snippets can be shortened to:

your script snippets can be shortened to:
<lsl>
   touch_start(integer total_number)
   {
       if(llDetectedKey(0) == owner)
       {
           llSay(0, "Du bist der Besitzer.");
       }
       else if(llDetectedKey(0) != owner)
       {
           llSay(0,"Du bist nicht der Besitzer.");
       }
   }

</lsl>

<lsl>
   touch_start(integer num_detected)
   {
       key touchingAvatar = llDetectedKey(0);
       string message = "You're not the owner.";
       if (touchingAvatar == owner)
           message = "You're the owner.";
       llSay(PUBLIC_CHANNEL, message);
   }

</lsl>

<lsl>
   touch_start(integer total_number)
   {
       if(llSameGroup(llDetectedKey(0)) == TRUE)
       {
           llSay(0, "You're wearing the right group tag.");
       }
       else if(llSameGroup(llDetectedKey(0)) == FALSE)
       {
           llSay(0,"You're not wearing the right group tag.");
       }
   }

</lsl>

<lsl>
   touch_start(integer num_detected)
   {
       string message = "You're not wearing the same group tag as this prim.";
       if (llSameGroup(llDetectedKey(0)))
           message = "You're wearing the same group tag as this prim.";
       llSay(PUBLIC_CHANNEL, message);
   }

</lsl>

<lsl>

if (~llListFindList(VIP, llCSV2List(llDetectedKey(0)))) ...; </lsl>

<lsl>

if (~llListFindList(VIP, [llDetectedKey(0)])) ...; </lsl>

-- Kireji Haiku 13:49, 11 November 2012 (PST)

Proper handling of touch_* should include a loop through all of num_detected. More often than not, num_detected will not be more than 1, but if it can be greater than 1 (it can), the script should be prepared to deal with it. Simple:

<lsl> touch_start(integer nd) { while (--nd) { foo(); } } </lsl>

To save memory consider something like the following. Not always appropriate, but handy:

<lsl> touch_start(integer nd) { list not = ["not ", ""]; while (--nd) { llSay(0, "You're " + llList2String(not, llSameGroup(llDetectedKey(nd))) + "wearing the same group tag as this prim."); } } </lsl>

-) fredgandt 17:29, 11 November 2012 (PST)