|
Pooptart Skall
Registered User
Join date: 29 Dec 2006
Posts: 18
|
10-25-2007 16:21
I've been sitting here for almost an hour going from lslwiki.net to Second Life, over to the SL Wiki, and back to Second Life, and back and forth and so on, trying to figure out how to combine strings and vars into one string!
float x = llFrand(1); float y = llFrand(1); float z = llFrand(1); string combine = ??????; llSay(-12, combine);
Trying to make string combine = <x,y,z>;
|
|
Jesse Barnett
500,000 scoville units
Join date: 21 May 2006
Posts: 4,160
|
10-25-2007 16:35
vector anyname; anyname.x = llFrand(1); anyname.y = llFrand(1); anyname.z = llFrand(1); llSay((string)anyname);
_____________________
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
|
|
Pooptart Skall
Registered User
Join date: 29 Dec 2006
Posts: 18
|
10-25-2007 16:51
yay thanks. You're every flavor of a lifesaver.
|
|
Stephen Zenith
Registered User
Join date: 15 May 2006
Posts: 1,029
|
10-26-2007 01:34
That works in this case, because it's a vector. In general, if you wanted to dump a load of numbers into a string, you would use something like:
integer a= 57; float b= 19.53;
string combine = "A = " + (string)a + ", B = " + (string)b;
llSay (-12, combine);
|
|
Champie Jack
Registered User
Join date: 6 Dec 2003
Posts: 1,156
|
10-26-2007 01:44
From: Pooptart Skall I've been sitting here for almost an hour going from lslwiki.net to Second Life, over to the SL Wiki, and back to Second Life, and back and forth and so on, trying to figure out how to combine strings and vars into one string! float x = llFrand(1); float y = llFrand(1); float z = llFrand(1); string combine = ??????; llSay(-12, combine); Trying to make string combine = <x,y,z>; Specifically, you are asking about typecasting. Information about typecasting can be found at http://www.lslwiki.net/lslwiki/wakka.php?wakka=Typecast
|