Hmm, perhaps I am missing something.
I am getting a Syntax error when I inject the relevant code. On the llAttachToAvatarTemp line.
Here's what my script looks like, in the relevant section:
if(llGetSubString(message, 0, 23) == llGetSubString(llGetInventoryName(GIVE_TYPE, itra), 0, 23)) { { llRequestPermissions( llGetOwner(), PERMISSION_ATTACH ); } llAttachToAvatarTemp(ATTACH_RHAND)(id, llGetInventoryName(GIVE_TYPE, itra)); jump close; } } while(--itra>=0);@close;
And here's the whole thing:
//////////////////////////////////////////////////////////// [K] Kira Komarov - 2011, License: GPLv3 //// Please see: http://www.gnu.org/licenses/gpl.html //// for legal details, rights of fair usage and //// the disclaimer and warranty conditions. //////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////// CONFIGURATION ////////////////////////////////////////////////////////////// // // The possible values for this parameter are:// 0 for textures.// 1 for sound.// 3 for landmarks.// 5 for clothing.// 6 for objects.// 7 for notecards.// 10 for scripts (the giver script will be excluded).// 13 for body parts.// 20 for animations.// 21 for gestures. // The type is 6, so using the reference above, this // script will hand out objects.integer GIVE_TYPE = 6; // //// END CONFIGURATION //////////////////////////////////////////////////////////// integer _runner = 0;integer _comHandle = 0;list _cList = [];list _storage = []; list mFwd() { if(_runner+1>llGetListLength(_storage)) return _cList; return (_cList = llListInsertList(llListInsertList(llList2List(_storage, ++_runner, _runner+=9), ["<= Back"], 0), ["Next =>"], 2));} list mBwd() { if(_runner-19<0) return _cList; return (_cList = llListInsertList(llListInsertList(llList2List(_storage, _runner-=19, _runner+=9), ["<= Back"], 0), ["Next =>"], 2));} default{ state_entry() { _storage = []; integer itra=llGetInventoryNumber(GIVE_TYPE)-1; do { if(llGetInventoryName(GIVE_TYPE, itra) != llGetScriptName()) _storage += llGetSubString(llGetInventoryName(GIVE_TYPE, itra), 0, 23); } while(--itra>=0); _cList = llListInsertList(llListInsertList(llList2List(_storage, _runner, _runner+=9), ["<= Back"], 0), ["Next =>"], 2); } listen( integer channel, string name, key id, string message ) { if(message == "<= Back") { llDialog(id, "Would you like Regular or Chocolate flavored Dragon Spunk?:\n", mBwd(), channel); return; } if(message == "Next =>") { llDialog(id, "Would you like Regular or Chocolate flavored Dragon Spunk?:\n", mFwd(), channel); return; } integer itra = llGetInventoryNumber(GIVE_TYPE)-1; do { if(llGetSubString(message, 0, 23) == llGetSubString(llGetInventoryName(GIVE_TYPE, itra), 0, 23)) { { llRequestPermissions( llGetOwner(), PERMISSION_ATTACH ); } llAttachToAvatarTemp( ATTACH_RHAND )(id, llGetInventoryName(GIVE_TYPE, itra)); jump close; } } while(--itra>=0);@close; llListenRemove(_comHandle); } touch_start(integer total_number) { integer comChannel = ((integer)("0x"+llGetSubString((string)llGetKey(),-8,-1)) & 0x3FFFFFFF) ^ 0xBFFFFFFF; _comHandle = llListen(comChannel, llDetectedName(0), llDetectedKey(0), ""); llDialog(llDetectedKey(0), "Would you like Regular or Chocolate flavored Dragon Spunk?:\n", _cList, comChannel); }}