Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
Aldrin-John-Olaer-Manalansan opened this issue Aug 30, 2024 · 0 comments
Open

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

Aldrin-John-Olaer-Manalansan opened this issue Aug 30, 2024 · 0 comments
Labels
priority:p3 Low priority scope:compiler type:bug Something isn't working

Comments

@Aldrin-John-Olaer-Manalansan

@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
@x87 x87 added type:bug Something isn't working priority:p3 Low priority scope:compiler labels Aug 31, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
priority:p3 Low priority scope:compiler type:bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants