wc3campaigns
WC3C Homepage - www.wc3c.netUser Control Panel (Requires Log-In)Engage in discussions with other users and join contests in the WC3C forums!Read one of our many tutorials, ranging in difficulty from beginner to advanced!Show off your artistic talents in the WC3C Gallery!Download quality models, textures, spells (vJASS/JASS), systems, and scripts!Download maps that have passed through our rigorous approval process!

Go Back   Wc3C.net > Warcraft III Modding > Developer's Corner > Triggers & Scripts
User Name
Password
Register Rules Get Hosted! Chat Pastebin FAQ and Rules Members List Calendar



Reply
 
Thread Tools Search this Thread
Old 10-18-2006, 07:42 AM   #1
Fr0zenLord
User
 
Join Date: Aug 2006
Posts: 123

Fr0zenLord has little to show at this moment (0)

Send a message via MSN to Fr0zenLord
Default Concentate strings ((or something)) lol

i've been trying to concentate strings in jass

I need to do this

Collapse 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.
Fr0zenLord is offline   Reply With Quote
Sponsored Links - Login to hide this ad!
Old 10-18-2006, 08:24 AM   #2
oNdizZ
User
 
oNdizZ's Avatar
 
Join Date: Jul 2004
Posts: 526

Submissions (2)

oNdizZ will become famous soon enough (33)oNdizZ will become famous soon enough (33)

Default

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
oNdizZ is offline   Reply With Quote
Old 10-18-2006, 09:01 AM   #3
Fr0zenLord
User
 
Join Date: Aug 2006
Posts: 123

Fr0zenLord has little to show at this moment (0)

Send a message via MSN to Fr0zenLord
Default

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
Fr0zenLord is offline   Reply With Quote
Old 10-18-2006, 09:19 AM   #4
blu_da_noob
Nonchalant
 
blu_da_noob's Avatar


Respected User
 
Join Date: Mar 2006
Posts: 1,933

Submissions (2)

blu_da_noob is just really nice (398)blu_da_noob is just really nice (398)blu_da_noob is just really nice (398)blu_da_noob is just really nice (398)blu_da_noob is just really nice (398)blu_da_noob is just really nice (398)

[Quicksilver #2] - 2nd Place[Quicksilver#1] 1st place

Send a message via MSN to blu_da_noob
Default

Just add strings inbetween? Eg:
set udg_time = months + ": " + I2S(m) + ", " + ....
__________________
blu_da_noob is offline   Reply With Quote
Old 10-18-2006, 09:45 AM   #5
Fireeye
Chos
 
Fireeye's Avatar
 
Join Date: Jun 2006
Posts: 495

Submissions (2)

Fireeye has a spectacular aura about (113)Fireeye has a spectacular aura about (113)Fireeye has a spectacular aura about (113)Fireeye has a spectacular aura about (113)

Default

Collapse 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?
Collapse 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)
Collapse 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.
Fireeye is offline   Reply With Quote
Old 10-18-2006, 10:03 AM   #6
Fr0zenLord
User
 
Join Date: Aug 2006
Posts: 123

Fr0zenLord has little to show at this moment (0)

Send a message via MSN to Fr0zenLord
Default

I see, thanks
Fr0zenLord is offline   Reply With Quote
Old 10-18-2006, 11:59 AM   #7
Toadcop
BuranX
 
Toadcop's Avatar
 
Join Date: Jul 2006
Posts: 1,886

Submissions (4)

Toadcop is just really nice (299)Toadcop is just really nice (299)

Approved Map: TcXSpell Making Session 10 Winner

Send a message via ICQ to Toadcop
Default

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...
Toadcop is offline   Reply With Quote
Old 10-18-2006, 02:01 PM   #8
Chuckle_Brother
Oh for the sake of fudge
 
Chuckle_Brother's Avatar


Respected User
 
Join Date: Dec 2005
Posts: 782

Submissions (2)

Chuckle_Brother will become famous soon enough (53)Chuckle_Brother will become famous soon enough (53)

Send a message via ICQ to Chuckle_Brother Send a message via AIM to Chuckle_Brother Send a message via MSN to Chuckle_Brother Send a message via Yahoo to Chuckle_Brother
Default

Not really all that relevant, but the proper word is concatenation...spelling?
__________________
"...you play a mean banjo"
Chuckle_Brother is offline   Reply With Quote
Old 10-18-2006, 07:56 PM   #9
Fr0zenLord
User
 
Join Date: Aug 2006
Posts: 123

Fr0zenLord has little to show at this moment (0)

Send a message via MSN to Fr0zenLord
Default lol

Yes, i know, :) just couldnt remember how to spell it very well, (Not a word I've encountered much:P)
Fr0zenLord is offline   Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off


All times are GMT. The time now is 05:48 PM.


Affiliates
The Hubb The JASS Vault Clan WEnW Campaign Creations Clan CBS GamesModding Flixreel Videos

Powered by vBulletin (Copyright ©2000 - 2018, Jelsoft Enterprises Ltd).
Hosted by www.OICcam.com
IT Support and Services provided by Executive IT Services