Difference between revisions of "Category talk:LSL Avatar/Name"
Jump to navigation
Jump to search
Kimm Paulino (talk | contribs) (Question about LegacyToUsername function) |
|||
Line 14: | Line 14: | ||
[[User:Kimm Paulino|Kimm Paulino]] 13:49, 14 March 2011 (PDT) | [[User:Kimm Paulino|Kimm Paulino]] 13:49, 14 March 2011 (PDT) | ||
:I'm pretty sure the old version would have no issue with a username but the new version usernames will fall straight through. -- '''[[User:Strife_Onizuka|Strife]]''' <sup><small>([[User talk:Strife_Onizuka|talk]]|[[Special:Contributions/Strife_Onizuka|contribs]])</small></sup> 11:17, 19 June 2012 (PDT) |
Latest revision as of 11:17, 19 June 2012
Presumably, if one checks the size of the list created in the LegacyToUsername function, then it can cope with being given a username or a legacy name and still return the correct string?
i.e. the following ...
<lsl>string LegacyToUsername(string legacy) {
list name = llParseString2List(llToLower(legacy), [" "],[]); if (llGetListLength(name) == 1)//no spaces, so is already a username return llList2String(name, 0);//string is already a username if(llList2String(name, 1) == "resident")//it's not a legacy account. return llList2String(name, 0);//first name is username return llDumpList2String(name, ".");
}</lsl>
Kimm Paulino 13:49, 14 March 2011 (PDT)