Comments (8)
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.
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.
It seems more an issue with the compiler override then with the function then. maybe it.pass parameters differently. Reopened.
from xobse.
@Forlini91 do the issue happen also with let statement?
from xobse.
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.
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.
@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.
Fixed in 2f06997
from xobse.
Related Issues (20)
- Per-Script InvenotryReferences
- GetAlchMenuApparatus doesn't work as documented HOT 2
- 22.9 wont work for some reason HOT 3
- obse error HOT 4
- [xOBSE22.2-xOBSE22.9]Input functions are not functioning properly with obcn_12416.dll, a Chinese localization plugin HOT 22
- Shows completely black window for half a second, then CTD. HOT 1
- A way of detecting which topic, line and response is currently being said in dialogue
- ModTable::Get().GetModIndex giving the wrong index HOT 3
- Suggestion: add syntax to allow adding event handlers directly. HOT 4
- Question: language standard, pull requests. HOT 4
- Suggestion: add functions to retrieve creature's Blood spray and Blood decal file paths.
- Remove limitation on using array of arrays for ar_CustomSort.
- xOBSE 22.10beta causes console spam for Lovers with PK script xx0090ea HOT 9
- Suggestion: add new Array type: RefMap.
- Wont work - Application Ioad error 5:0000065434 HOT 5
- Console Spam With Dynamic Mesh Swappers Like Blockhead
- Not compatible with Enhanced Hotkeys & FormID Finder? HOT 2
- RemoveEventHandler and OnKey events
- Minor Wiki Typo
- sv_Replace(StringVar::Replace function in StringVar.cpp) does not take into account when the target is a multibyte character(Problems occurred with Ultimate Leveling in Japanese environment.) HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from xobse.