Hello!
I have the below trigger with conditions that the substring has to be between 50-400. No matter what is typed in the chat (like "-cam 999"), only the Else is running, even when it shouldnt.. I tried converting the substring to a real and doing the same condition comparison which did not work either.

I have the below trigger with conditions that the substring has to be between 50-400. No matter what is typed in the chat (like "-cam 999"), only the Else is running, even when it shouldnt.. I tried converting the substring to a real and doing the same condition comparison which did not work either.
-
camAdjust
-

Events
-


Player - Player 1 (Red) types a chat message containing -cam as A substring
-
-

Conditions
-

Actions
-


Set VariableSet camInteger = (Integer((Substring((Entered chat string), 6, 8))))
-


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



If - Conditions
-




camInteger Less than 50
-




camInteger Greater than 400
-
-



Then - Actions
-




Custom script: if GetLocalPlayer() == GetTriggerPlayer() then
-




Sound - Play Error <gen>
-




Custom script: endif
-




Game - Display to (Player group((Triggering player))) the text: |cffff0000Error:|r ...
-
-



Else - Actions
-




Game - Display to (All players) the text: (String(camInteger))
-




Set VariableSet camera_distance[(Player number of (Triggering player))] = (10.00 x (Real(camInteger)))
-
-
-
-

