• 🏆 Texturing Contest #33 is OPEN! Contestants must re-texture a SD unit model found in-game (Warcraft 3 Classic), recreating the unit into a peaceful NPC version. 🔗Click here to enter!

bug in map editor of numberic and letters

Status
Not open for further replies.
Level 4
Joined
Oct 18, 2007
Messages
99
Hi.
I did that when a player says "camera 100" it will make the camera go to 100 range when he say range 10000 it will go to the maximum range available which is 2000

the problam is that when a player says camera wtf9
it makes a bug that crushes the game

because that - I need a way to check if a text contains only numbers
plz help
 
Level 7
Joined
Mar 8, 2009
Messages
360
I think this should work.

  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
    • If - Conditions
      • (Integer((Substring((Entered chat string), 8, 11)))) Less than or equal to 2000
      • (Integer((Substring((Entered chat string), 8, 11)))) Greater than or equal to 0
    • Then - Actions
      • Camera - Set (Owner of (Triggering unit))'s camera Distance to target to Integer((Substring((Entered chat string), 8, 11))) over 1.00 seconds
    • Else - Actions
 
Level 4
Joined
Oct 18, 2007
Messages
99
I think this should work.

  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
    • If - Conditions
      • (Integer((Substring((Entered chat string), 8, 11)))) Less than or equal to 2000
      • (Integer((Substring((Entered chat string), 8, 11)))) Greater than or equal to 0
    • Then - Actions
      • Camera - Set (Owner of (Triggering unit))'s camera Distance to target to Integer((Substring((Entered chat string), 8, 11))) over 1.00 seconds
    • Else - Actions


It did! +rep
Note : took me a lot of time to understand this and i appreciate your help
 
Last edited:
Status
Not open for further replies.
Top