|
Darc Bender
Registered User
Join date: 11 Aug 2006
Posts: 2
|
08-25-2006 19:14
- Hi. I'm attempting have one string be converted to strings and text.. Is this possible?
ie:
user input: "/4 text, value" ---------- or "/4 value, text"
----------- listen hears msg on channel 4 and sets as msg ------------ testList=(list)msg; ----------- ??? can it make a testList=["text",value] somehow?
- if this is not possible is SL planning on updating this command or making a new command to support this action? In last resort what would be a good way around this, making a routine to look for blocks of values between commas and test wheither is it's a value or text?
- Another question that plagues my mind, after you save an (linked)object is it possible to decrease it's size?
Thanks, Brian (Darc Bender)
|
|
Osgeld Barmy
Registered User
Join date: 22 Mar 2005
Posts: 3,336
|
08-25-2006 19:47
yes
see scripting fourm or the lsl wiki (llPhraseString2List) dont use llCSV2List, it usually screws up (esp when dealing with vectors and rotations)
question 2 not via script, but you can hold down ctrl and shift while editing the linked object and scale the entire object @ once (doenst have to be linked either just more than one prim)
you could do this by script but it only deals with 1 prim via 1 script
|
|
Darc Bender
Registered User
Join date: 11 Aug 2006
Posts: 2
|
08-25-2006 22:56
Thanks a bunch for the quick reply, I'll try it out the next time I log on. I changed all my routines to integer/vector/rotation inputs for the ones that needed text and values just used 0 = no and >0 = yes.. if yes -1 to the answer to get the integer (no answer doesn't need more input).. and all no/yes with integer value responses were seperated by channels.. Came out very confusing but works.
Unoriganized but here's the possible inputs for the script.. Channel 1 R,G,B 'User Defined Channel 2 ColorNumber,R,G,B 'For Loading Channel 3 R,G,B 'Save and Change Channel 4 (ON/OFF+ColorNumber) 'Randomize Color/Save if > 0 Channel 5 ColorNumber 'Save Current Color
bleah alot to remember, and makes for alot of unneeded script. To save the user from writing too much I have "<" and ">" automatically added before converting string to vector.
Thanks again, Brian (Darc Bender)
|
|
Baron Hauptmann
Just Designs / Scripter
Join date: 29 Oct 2005
Posts: 358
|
08-26-2006 07:44
Osgeld - I assume you are thinking of llParseString2List?
And . . . I have seen a number of comments about llCSV2List, but I have been using it seemingly without any problems. When it "breaks", is it random - working one time and not the next, or is it somehow predictable what will break it? I do not use it with any user-generated data, like from chat; it only gets used in link messages and listens between scripts. But I want to know if I should be avoiding it.
If there IS a possibility for llCSV2List breaking, is there any advantage to using it over llParseString2List?
Thanks, Baron
|
|
Osgeld Barmy
Registered User
Join date: 22 Mar 2005
Posts: 3,336
|
08-26-2006 12:11
it just doesnt randomly break its just how comma's are used mostly in vectors and rotations, but it can effect strings too ie
"bob likes candy, and jane does too" gets stored as 2 list entrys instead of the intended one
i see real no advantage to using CSV over phase string, course if it works for you thats fine
the only time ive used it is with my bug tracker... mantis the php system im using happens to output a report in CSV, and i dont feel like changing it
on the other hand my rss headline reader gets the data broken up by ** on my website and lsl uses phrase string ..
|