OpenKore / openkore

A free/open source client and automation tool for Ragnarok Online
http://openkore.com
Other
1.28k stars 1.04k forks source link

[EventMacro.pl] Problem with ( ) in conditions #1123

Closed Mortimal closed 5 years ago

Mortimal commented 7 years ago
Summary:

When there is ( ) inside any condition as part of a string if statement works incorrect

Affected configuration(s)/ file(s):

Runner.pm -> sub parse_and_check_condition_text (and subs it is calling) -> line 1212

Impact:

Getting error in comparison statements

Expected Behavior:.

Condition must be met

Actual Behavior:

Condition not met

Steps to Reproduce:
macro testme{
  $va1 = isatext
  log $va1
  $va2 = (isatext)
  log $va2
  if ($va1 == "isatext") {
   log correct
  }
  if ($va2 == "(isatext)") {
   log error here
  }
}

Request

Summary:

Need to be rewritten all logic of conditions parsing

Affected configuration(s)/ file(s):

Runner.pm -> sub parse_and_check_condition_text (and subs it is calling) -> line 1212

Benefits:

1 You fix this... 2 Bug disappear... 3 ......... 4 Profit!

Nipodemos commented 5 years ago

2368 fixed this issue.