Difference between revisions of "User talk:Yosef Enoch"
Jump to navigation
Jump to search
m (I'm stupid... thx Kuraiko!) |
|||
Line 8: | Line 8: | ||
llSleep(0.5); | llSleep(0.5); | ||
string v = llGetObjectDesc(); | string v = llGetObjectDesc(); | ||
llOwnerSay(llList2CSV([v == "\n", v == "\\n"]); | llOwnerSay(llList2CSV([v == "\n", v == "\\n"])); | ||
} | } | ||
}</lsl> | }</lsl> | ||
Line 19: | Line 19: | ||
I think you have become a bit confused, escape characters are a feature of the compiler, not the runtime. The compiler is what translates escape codes in string constants in the source code. | I think you have become a bit confused, escape characters are a feature of the compiler, not the runtime. The compiler is what translates escape codes in string constants in the source code. | ||
-- '''[[User:Strife_Onizuka|Strife]]''' <sup><small>([[User talk:Strife_Onizuka|talk]]|[[Special:Contributions/Strife_Onizuka|contribs]])</small></sup> 20:39, 17 July 2009 (UTC) | -- '''[[User:Strife_Onizuka|Strife]]''' <sup><small>([[User talk:Strife_Onizuka|talk]]|[[Special:Contributions/Strife_Onizuka|contribs]])</small></sup> 20:39, 17 July 2009 (UTC) | ||
:It looks like LSL can't handle comparisons within functions. It's not compiling with [[llOwnerSay]]([[llList2CSV]]([v == "\n", v == "\\n"]); | :<strike>It looks like LSL can't handle comparisons within functions. It's not compiling with [[llOwnerSay]]([[llList2CSV]]([v == "\n", v == "\\n"]);</strike> | ||
:Besides that, [[llSetObjectDesc]]("\n"); sets the objects desc to '''?'''... Maybe 'cause it doesn't know how to handle a line break there... (o.O) | :Besides that, [[llSetObjectDesc]]("\n"); sets the objects desc to '''?'''... Maybe 'cause it doesn't know how to handle a line break there... (o.O) | ||
:--[[File:Zai_signature.png|45px|link=User:Zai Lynch]] <sup><small>([[User talk:Zai Lynch|talk]]|[[Special:Contributions/Zai Lynch|contribs]])</small></sup> 22:00, 17 July 2009 (UTC) | :--[[File:Zai_signature.png|45px|link=User:Zai Lynch]] <sup><small>([[User talk:Zai Lynch|talk]]|[[Special:Contributions/Zai Lynch|contribs]])</small></sup> 22:00, 17 July 2009 (UTC) | ||
::P.S.: When you set the description manually to \n in the description field of the prim, then LSL will return "\\n" with llGetDesc(). Which is... somehow correct. | ::P.S.: When you set the description manually to \n in the description field of the prim, then LSL will return "\\n" with llGetDesc(). Which is... somehow correct. | ||
::--[[File:Zai_signature.png|45px|link=User:Zai Lynch]] <sup><small>([[User talk:Zai Lynch|talk]]|[[Special:Contributions/Zai Lynch|contribs]])</small></sup> 22:04, 17 July 2009 (UTC) | ::--[[File:Zai_signature.png|45px|link=User:Zai Lynch]] <sup><small>([[User talk:Zai Lynch|talk]]|[[Special:Contributions/Zai Lynch|contribs]])</small></sup> 22:04, 17 July 2009 (UTC) | ||
::Gives 0,0 --[[File:Zai_signature.png|45px|link=User:Zai Lynch]] <sup><small>([[User talk:Zai Lynch|talk]]|[[Special:Contributions/Zai Lynch|contribs]])</small></sup> 23:09, 17 July 2009 (UTC) |
Revision as of 16:09, 17 July 2009
llGetObjectDesc
I saw your addition to llGetObjectDesc, but I'm not sure what you mean by it. Could you provide an example of this? Are you saying that:
<lsl>default{
state_entry(){ llSetObjectDesc("\n"); llSleep(0.5); string v = llGetObjectDesc(); llOwnerSay(llList2CSV([v == "\n", v == "\\n"])); }
}</lsl> Are you saying the above code will say:
- "Object: 0, 1"
I'm pretty sure it should be saying:
- "Object: 1, 0"
I can't get inworld right now to test this.
I think you have become a bit confused, escape characters are a feature of the compiler, not the runtime. The compiler is what translates escape codes in string constants in the source code. -- Strife (talk|contribs) 20:39, 17 July 2009 (UTC)
It looks like LSL can't handle comparisons within functions. It's not compiling with llOwnerSay(llList2CSV([v == "\n", v == "\\n"]);- Besides that, llSetObjectDesc("\n"); sets the objects desc to ?... Maybe 'cause it doesn't know how to handle a line break there... (o.O)
- -- (talk|contribs) 22:00, 17 July 2009 (UTC)