Skip to content

"if {comment} not" produces compiler error #351

Closed

Description

@x87 , Any conditional opcodes with a comment between if not produces compilation error:

{$CLEO}
{$USE ini}
if {8AA2:} not 0@ = load_dynamic_library {fileName} "cleo/test.dll" // <<<< causes compilation error
then print_string_now "load test.dll failed" 10000
end

wait 1000

if {8AF0:} not 0@ = read_int_from_ini_file {path} "cleo/test.ini" {section} "thissection" {key} "thiskey" // <<<< causes compilation error
then print_string_now "read test.ini failed" 10000
end

{0A93:} terminate_this_custom_script

This Works though:

{$CLEO}
{$USE ini}
if not {8AA2:} 0@ = load_dynamic_library {fileName} "cleo/test.dll" // <<<< it works
then print_string_now "load test.dll failed" 10000
end

wait 1000

if not {8AF0:} 0@ = read_int_from_ini_file {path} "cleo/test.ini" {section} "thissection" {key} "thiskey" // <<<< it works
then print_string_now "read test.ini failed" 10000
end

{0A93:} terminate_this_custom_script
{$CLEO}
{$USE ini}
if or
    not {8AA2:} 0@ = load_dynamic_library {fileName} "cleo/test.dll" // <<<< it works
    not {8AF0:} 0@ = read_int_from_ini_file {path} "cleo/test.ini" {section} "thissection" {key} "thiskey" // <<<< it works
then print_string_now "something went wrong" 10000
end

{0A93:} terminate_this_custom_script

I think this is a bug, because this also works as well:

{$CLEO}
{$USE ini}
if or
    {8AA2:} not 0@ = load_dynamic_library {fileName} "cleo/test.dll" // <<<< it works
    {8AF0:} not 0@ = read_int_from_ini_file {path} "cleo/test.ini" {section} "thissection" {key} "thiskey" // <<<< it works
then print_string_now "something went wrong" 10000
end

{0A93:} terminate_this_custom_script

Activity

  1. added
    type:bug
    priority:p3
    on Aug 31, 2024
  2. added this to the v4.1.0 milestone on Jan 21, 2025
  3. x87 commented on Mar 16, 2025

    @x87
    Collaborator

    Fixed in 4.1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    priority:p3scope:compilertype:bug

    Type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions