Greeting script problem
|
|
Linnrenate Crosby
Registered User
Join date: 5 Jun 2007
Posts: 49
|
09-30-2007 07:46
Hia, why will not this work: { llSay(0, + llGetOwner (void) + " Welcomes you to his place. " + llDetectedName(i) + ", feel free to look around and make yourself at home."  ; } I Want the output to be: Linnrenate Crosby Welcomes you to her place. Detected person feel free to look around and make yourself at home. I try to mod this script according to my needs: /54/46/196815/1.html#post1582460EDIT: Umm and i want it to even greet me the owner as it's the only way for me to test that it's working. Thanks, Linn
|
|
Jesse Barnett
500,000 scoville units
Join date: 21 May 2006
Posts: 4,160
|
09-30-2007 07:58
From: Linnrenate Crosby Hia, why will not this work: { llSay(0, + llGetOwner (void) + " Welcomes you to his place. " + llDetectedName(i) + ", feel free to look around and make yourself at home."  ; } I Want the output to be: Linnrenate Crosby Welcomes you to her place. Detected person feel free to look around and make yourself at home. I try to mod this script according to my needs: /54/46/196815/1.html#post1582460/54/46/196815/1.html#post1582460EDIT: Umm and i want it to even greet me the owner as it's the only way for me to test that it's working. Thanks, Linn llGetOwner returns the key of the owner, not thier name. You could use Key2Name to get the owners name but you should really have this declared as a global and have it in a state_entry with an onrez reset script function. Don't make the sim work harder by processing all of this info everytime the object is touched. llDetectedName(i) should be llDetectedName(0) which will return the name of person that touched it.
_____________________
I (who is a she not a he) reserve the right to exercise selective comprehension of the OP's question at anytime. From: someone I am still around, just no longer here. See you across the aisle. Hope LL burns in hell for archiving this forum
|
|
Jesse Barnett
500,000 scoville units
Join date: 21 May 2006
Posts: 4,160
|
09-30-2007 08:08
string owner;
default { state_entry() { owner = llKey2Name(llGetOwner()); } on_rez(integer start_param) { llResetScript(); } touch_start(integer total_number) { llSay(0, owner + " Welcomes you to his place. " + llDetectedName(0)); } }
_____________________
I (who is a she not a he) reserve the right to exercise selective comprehension of the OP's question at anytime. From: someone I am still around, just no longer here. See you across the aisle. Hope LL burns in hell for archiving this forum
|
|
Linnrenate Crosby
Registered User
Join date: 5 Jun 2007
Posts: 49
|
09-30-2007 08:17
Thanks guys, but my problem is that i do not know shit about scripts.... someone just told me that the doomats that i sell should have a greeting script inside that would greet everyone.... and for testing i need it to greet me too. But this seams impossible for me so i think i will ditch that idea 
|
|
Flennan Roffo
Scripter
Join date: 29 Sep 2007
Posts: 26
|
09-30-2007 09:36
From: Linnrenate Crosby Thanks guys, but my problem is that i do not know shit about scripts.... someone just told me that the doomats that i sell should have a greeting script inside that would greet everyone.... and for testing i need it to greet me too. But this seams impossible for me so i think i will ditch that idea  Simply ask someone else, or give it to someone else and have that person rezz the object with the greeting script, so that you can test it yourself.
|
|
Shyan Graves
Registered User
Join date: 10 Feb 2007
Posts: 52
|
09-30-2007 12:46
The following script is working for me! key Receiver; string ReceiverName; key OwnerKey; key QueryID; string OwnerName; integer i; default { // initialize state state_entry() { OwnerKey = llGetOwner(); QueryID = llRequestAgentData(OwnerKey, DATA_NAME); } dataserver(key requested, string data) { if ( QueryID == requested) { OwnerName = data; state running; } } on_rez(integer start_param) { llResetScript(); } } state running { collision_start(integer total_number) { for(integer i = 0; i<total_number; i++) { Receiver = llDetectedKey(i); ReceiverName = llKey2Name(Receiver); llInstantMessage(Receiver, OwnerName + " welcomes you to his/her place." + ReceiverName + ", feel free to look around and make yourself at home."); } } on_rez(integer start_param) { llResetScript(); } }
</FONT>
|
|
Jesse Barnett
500,000 scoville units
Join date: 21 May 2006
Posts: 4,160
|
09-30-2007 13:09
OK let me get this straight. You posted the script for the OP to use but you copyrighted that same script so that no one could use it  ???????
_____________________
I (who is a she not a he) reserve the right to exercise selective comprehension of the OP's question at anytime. From: someone I am still around, just no longer here. See you across the aisle. Hope LL burns in hell for archiving this forum
|
|
Shyan Graves
Registered User
Join date: 10 Feb 2007
Posts: 52
|
09-30-2007 20:10
Sorry Jesse, cut&paste the whole coding from my editor, that added the copyright by default  changed that so everybody can use it! From: Jesse Barnett OK let me get this straight. You posted the script for the OP to use but you copyrighted that same script so that no one could use it  ??????? Regards, Shyan
|
|
Jesse Barnett
500,000 scoville units
Join date: 21 May 2006
Posts: 4,160
|
09-30-2007 21:11
From: Shyan Graves Sorry Jesse, cut&paste the whole coding from my editor, that added the copyright by default  changed that so everybody can use it! Regards, Shyan Don't worry about it. It put a great big smile on my face that lasted all afternoon. I found it more then rather amusing. Plus you helped the OP who is just beginning to learn scripting and that is always a big thumbs up in my book!
_____________________
I (who is a she not a he) reserve the right to exercise selective comprehension of the OP's question at anytime. From: someone I am still around, just no longer here. See you across the aisle. Hope LL burns in hell for archiving this forum
|
|
Linnrenate Crosby
Registered User
Join date: 5 Jun 2007
Posts: 49
|
10-04-2007 04:42
Hey Shyan, thanks a lot. But when i save the script i get this:
(72, 4) : ERROR : syntax error in this line:
And it jumps to this line: for(integer i = 0; i<total_number; i++)
Thanks, Linn
|
|
Shyan Graves
Registered User
Join date: 10 Feb 2007
Posts: 52
|
10-04-2007 20:22
Hi Linn, change the line to for( i = 0; i<total_number; i++ ) From: Linnrenate Crosby Hey Shyan, thanks a lot. But when i save the script i get this: (72, 4) : ERROR : syntax error in this line: And it jumps to this line: for(integer i = 0; i<total_number; i++) Thanks, Linn Shyan
|