Go
Wc3C.net
»
Warcraft III Modding
»
Developer's Corner
»
Triggers & Scripts
»
array sting help needed
array sting help needed
06-23-2006, 02:24 PM
#1
evilmapcreater
i have a string called (array) <letters> and a string called <numbersofletters>
and a string called <the word>.
i wana set (array 1) <letters> to the first letter of <the word>
how could i do that?
Don 't mass smilies again, please.
06-23-2006, 02:31 PM
#2
PipeDream
>>>>
http://www.wc3campaigns.net/faq.php?..._revised_rules
<<<<
I'm not sure what you're asking.
JASS:
set
letters
=
SubString
(
theword
,
0
,
1
)
(?)
06-23-2006, 02:54 PM
#3
evilmapcreater
lets say <the word> was hotdog
this is my question, how would i set array 1 of <letters> to be h (first letter of the <the word> string)
would the jass you said do that?
06-23-2006, 02:58 PM
#4
PipeDream
So you can't read the rules or run the world editor? Guess you're shit out of luck. :(
06-23-2006, 03:01 PM
#5
The)TideHunter(
I think your asking this:
Trigger:
Actions
Set TheString = Hotdog
For each (Integer A) from 1 to (Length of TheString), do (Actions)
Loop - Actions
Set Letters[(Integer A)] = (Substring(TheString, (Integer A), (Integer A)))
But please give us more infomation in future to help us help you
EDIT: Explanation, this will set Letters[1] = H, Letters[2] = o, Letters[3] = t, etc
EDIT2: I just noticed the Smilies, i agree with Pipe, you should read over the rules. Spam of smilies isent allowed.
06-23-2006, 03:01 PM
#6
Vexorian
In JASS it is what Pipedream said. For GUI you can use the String - SubString trigger call or something like that
06-23-2006, 03:03 PM
#7
evilmapcreater
thx