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

IsReference return 1 when called on all forms with Compiler Override #2

Closed
llde opened this issue Jul 13, 2016 · 8 comments
Closed
Assignees

Comments

@llde
Copy link
Owner

llde commented Jul 13, 2016

No description provided.

@llde
Copy link
Owner Author

llde commented Jul 14, 2016

I cannot reproduce this issue. Maybe there is only on some edge cases. Tested Spell and Quest record, they return 0 as expected. Closing

@llde llde closed this as completed Jul 14, 2016
@Forlini91
Copy link

Forlini91 commented Jul 17, 2016

Reopen the issue!! I found the problem is caused by the OBSE compiler:

scn fnTestRef

String_Var name
Ref rVar

Begin Function { name, rVar }
    If IsReference rVar
        Print name + " is a Reference"
    Else
        Print name + " is a Base Object"
    EndIf
End

This works correctly, but if I enable the OBSE compiler with '_' before Function, the command stops working: it always returns 1, no matter the parameter (as opposed to my first report, where I only reported the forms which cannot have references).

@llde
Copy link
Owner Author

llde commented Jul 18, 2016

It seems more an issue with the compiler override then with the function then. maybe it.pass parameters differently. Reopened.

@llde llde reopened this Jul 18, 2016
@llde llde changed the title IsReference return 1 when called on forms that cannot have references IsReference return 1 when called on all forms with Compiler Override Jul 18, 2016
@llde
Copy link
Owner Author

llde commented Jul 18, 2016

@Forlini91 do the issue happen also with let statement?

@Forlini91
Copy link

Forlini91 commented Jul 18, 2016

Yes, it happens with Let too, but it still only happens if the compiler override is enabled.
I tested with this:

scn fnTestRef

String_Var name
Ref rVar
Short isRef

Begin _Function { name, rVar }
    Let isRef := IsReference rVar
    If isRef
        Print name + " is a Reference"
    Else
        Print name + " is a Base Object"
    EndIf
End

Everything (base objects without references, base objects with references and references) return 1, so it prints "... is a Reference"

@llde
Copy link
Owner Author

llde commented Jul 18, 2016

Ok Tested in a _GameMode block (so Compiler override active):
First result in the first script execution is returning correctly 0, from second it is returning always 1.
In the next iterations return always 1.
Maybe there is an issue with the ExtractArgs() hook and the script's ContextExecution retriving.

@llde
Copy link
Owner Author

llde commented Jul 18, 2016

@Forlini91 @shadeMe
I fixed the specific functions, but it may be a greater issue with compiler override that affect similar functions. In case open a new bug.
Closing this.

@llde llde closed this as completed Jul 18, 2016
@llde llde self-assigned this Jul 18, 2016
@llde llde reopened this Sep 26, 2020
@llde
Copy link
Owner Author

llde commented Sep 27, 2020

Fixed in 2f06997

@llde llde closed this as completed Sep 27, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants