Chaosy
Tutorial Reviewer
- Joined
- Jun 9, 2011
- Messages
- 13,288
Hello. I was trying to detect if a part of string A matches string B. Somehow it bugs a lot.
None of these characters exist in the string "hej"
it should look like:
h
e
j
-
Settings
-

Events
-


Map initialization
-
-

Conditions
-

Actions
-


Set colors[1] = |c00FF0303
-


Set commands[1] = [red]
-


Set endCommand = [/end]
-


Set count = 1
-
-
JASS:
hook TransmissionFromUnitWithNameBJ x
-
System
-

Events
-

Conditions
-

Actions
-


Custom script: endfunction
-


Custom script: function x takes force toForce, unit whichUnit, string unitName, sound soundHandle, string message, integer timeType, real timeVal, boolean wait returns nothing
-


Custom script: local string udg_message = message
-


For each (Integer message_loop) from 1 to (Length of message), do (Actions)
-



Loop - Actions
-




For each (Integer command_loop) from 1 to count, do (Actions)
-





Loop - Actions
-






For each (Integer character_loop) from 1 to (Length of commands[command_loop]), do (Actions)
-







Loop - Actions
-








Set s1 = (Substring(message, message_loop, message_loop))
-








Set s2 = (Substring(commands[command_loop], character_loop, character_loop))
-








Game - Display to (All players) the text: s1
-








If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-









If - Conditions
-










s1 Equal to s2
-
-









Then - Actions
-










Game - Display to (All players) the text: ss
-
-









Else - Actions
-
-
-
-
-
-
-
-
-
-
test
-

Events
-


Player - Player 1 (Red) skips a cinematic sequence
-
-

Conditions
-

Actions
-


Cinematic - Send transmission to (All players) from Paladin 0001 <gen> named Chaos: Play No sound and display hej. Modify duration: Set to 2.00 seconds and Don't wait
-
-
None of these characters exist in the string "hej"
it should look like:
h
e
j
Last edited:



