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

Compiler breaks if RETURN_IF_FALSE (0AA1:) is used after IF AND or IF OR #192

Closed
firedihm opened this issue May 27, 2022 · 3 comments
Closed

Comments

@firedihm
Copy link

If RETURN_IF_FALSE (opcode or keyword) is used after IF AND or IF OR conditional the compiler gives all kinds of errors related to improper formatting. If you replace AND or OR with digit then the compiler is fine.

@x87
Copy link
Collaborator

x87 commented May 27, 2022

Can you show a code sample?

@firedihm
Copy link
Author

firedihm commented May 27, 2022

if and
    0@ <> #PREDATOR
    0@ <> #RHINO
    0@ <> #TRAIN
    0@ <> #DODO
    0@ <> #SPEEDER
    0@ <> #REEFER
    0@ <> #GHOST
return_if_false

if or
    Car.IsModel(1@, #LINERUN)
    Car.IsModel(1@, #FIRETRUK)
    Car.IsModel(1@, #TRASH)
    Car.IsModel(1@, #MULE)
    Car.IsModel(1@, #AMBULAN)
    Car.IsModel(1@, #MRWHOOP)
    Car.IsModel(1@, #ENFORCER)
    Car.IsModel(1@, #BUS)
then
    ...
end

With setup abobe compiler claims that THEN is a redundant logical operator, but if you replace AND with 6 script compiles successfully. I was testing this in GTA3 mode.

@firedihm
Copy link
Author

Hmm, I think this is a dupe of #133

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants