Wc3C.net Concentate strings ((or something)) lol
 Register Rules Get Hosted! Chat Pastebin FAQ and Rules Members List Calendar

 10-18-2006, 07:42 AM #1 Fr0zenLord User   Join Date: Aug 2006 Posts: 123 Concentate strings ((or something)) lol i've been trying to concentate strings in jass I need to do this JASS:```local integer s = 0 local integer m = 0 local integer h = 0 local integer d = 0 local integer mn local string seconds = "Seconds" local string minutes = "Minutes" local string hours = "Hours" local string days = "Days" local string months = "Months" loop if s >= 60 then set m = (m+1) elseif m >= 60 then set h = (h+1) elseif h >= 24 then set d = (d+1) elseif d >= GetRandomInt(28,31) then set mn = (mn+1) call PolledWait(1.00) set s = (s+1) set udg_time = (months+ (I2S(mn)+ (days+ (I2S(d)+ (hours+ (I2S(h)+ (minutes+ (I2S(m)+ (seconds+ (I2S(s))))))))))) endif endloop``` Now um, how do I put spaces between em, and do it correctly! lol Last edited by Fr0zenLord : 10-18-2006 at 07:42 AM.
 10-18-2006, 08:24 AM #2 oNdizZ User     Join Date: Jul 2004 Posts: 526 Submissions (2) set udg_time = months + I2S(mn) + days + I2S(d) + hours + I2S(h) + minutes + I2S(m) + seconds + I2S(s) first off, you dont need all those extra '(' and ')' that gui tends to give you, atleast not when you're dealing with strings. what do you want it to show? as it is now it would show something like: months0days0hours0minutes0seconds0 __________________ In need of a Macromedia Flash script tutor. RIP - L2Extreme
 10-18-2006, 09:01 AM #3 Fr0zenLord User   Join Date: Aug 2006 Posts: 123 I want it to show Months: 0, Days: 0, Hours :0, Minutes: 0, Seconds: 0 How I do that O_O, and how can I do it w/o the (((((((((((((((((((((('s lol
 10-18-2006, 09:19 AM #4 blu_da_noob Nonchalant   Respected User   Join Date: Mar 2006 Posts: 1,933 Submissions (2) Just add strings inbetween? Eg: set udg_time = months + ": " + I2S(m) + ", " + .... __________________
 10-18-2006, 09:45 AM #5 Fireeye †ChÆos†™     Join Date: Jun 2006 Posts: 495 Submissions (2) JASS:```set udg_time = ("months: " + I2S(mn) + ", " + "days: " + I2S(d) + ", " + "hours: " + I2S(h) + ", " + "minutes: " + I2S(m) + ", " + "seconds: " + I2S(s)) ``` And are you sure you want it this way? JASS:```if s >= 60 then set m = (m+1) elseif m >= 60 then set h = (h+1) elseif h >= 24 then set d = (d+1) elseif d >= GetRandomInt(28,31) then set mn = (mn+1) call PolledWait(1.00) set s = (s+1) set udg_time = ("months: " + I2S(mn) + "days: " + I2S(d) + "hours: " + I2S(h) + "minutes: " + I2S(m) + "seconds: " + I2S(s)) endif ``` I would make it like (without timer) JASS:```if s >= 60 then set m = (m+1) set s = 0 elseif m >= 60 then set h = (h+1) set m = 0 elseif h >= 24 then set d = (d+1) set h = 0 elseif d >= GetRandomInt(28,31) then set mn = (mn+1) set d = 1 endif call PolledWait(1.00) set s = (s+1) set udg_time = ("months: " + I2S(mn) + "days: " + I2S(d) + "hours: " + I2S(h) + "minutes: " + I2S(m) + "seconds: " + I2S(s)) ``` __________________ Last edited by Fireeye : 10-18-2006 at 09:46 AM.
 10-18-2006, 10:03 AM #6 Fr0zenLord User   Join Date: Aug 2006 Posts: 123 I see, thanks
 10-18-2006, 11:59 AM #7 Toadcop BuranX     Join Date: Jul 2006 Posts: 1,886 Submissions (4) Fr0zenLord - it's extream simple... it would be better you would not have i-net like me so you would have time to think about this self...
 10-18-2006, 02:01 PM #8 Chuckle_Brother Oh for the sake of fudge   Respected User   Join Date: Dec 2005 Posts: 782 Submissions (2) Not really all that relevant, but the proper word is concatenation...spelling? __________________ "...you play a mean banjo"
 10-18-2006, 07:56 PM #9 Fr0zenLord User   Join Date: Aug 2006 Posts: 123 lol Yes, i know, :) just couldnt remember how to spell it very well, (Not a word I've encountered much:P)