Code Monkey home page Code Monkey logo

Comments (8)

llde avatar llde commented on August 21, 2024

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

from xobse.

Forlini91 avatar Forlini91 commented on August 21, 2024

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).

from xobse.

llde avatar llde commented on August 21, 2024

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

from xobse.

llde avatar llde commented on August 21, 2024

@Forlini91 do the issue happen also with let statement?

from xobse.

Forlini91 avatar Forlini91 commented on August 21, 2024

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"

from xobse.

llde avatar llde commented on August 21, 2024

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.

from xobse.

llde avatar llde commented on August 21, 2024

@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.

from xobse.

llde avatar llde commented on August 21, 2024

Fixed in 2f06997

from xobse.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.