#134 closed enhancement (wontfix)
Display a warning when an undeclared variable is used in BSL
Reported by: | s10k | Owned by: | Iritscen |
---|---|---|---|
Priority: | minor | Component: | Daodan/Win |
Keywords: | Cc: |
Description (last modified by )
It would very useful if instead of ignoring and causing silent issues, if the BSL parser could emit a warning when a variable that was not been declared is used.
How it is right now it raises a very hard to debug issue.
\Edit
Changed error to warning, because if we would emit an error, it could break existing scripts.
Change History (8)
comment:1 by , 6 years ago
Description: | modified (diff) |
---|---|
Summary: | Display an error when an undeclared variable is used in BSL → Display an warning when an undeclared variable is used in BSL |
comment:2 by , 6 years ago
Summary: | Display an warning when an undeclared variable is used in BSL → Display a warning when an undeclared variable is used in BSL |
---|
comment:3 by , 6 years ago
Description: | modified (diff) |
---|
comment:4 by , 6 years ago
Owner: | changed from | to
---|---|
Status: | new → assigned |
comment:5 by , 6 years ago
To me, this is a job for a BSL validator, i.e., a program that you run on your code before giving it to Oni. I know there's been one or two attempts at making one, but as they were Windows-only I'm not sure how far they got.
The only way I can think of to implement the requested feature inside Oni is to have the Daodan DLL validate BSL when a level loads, which seems like the wrong time and place to perform a task that could be done in advance by an external program.
comment:6 by , 6 years ago
Well, the question would be if the parser already had a code that checks for a variable name it finds in the code and if that thing currently silently ignored that line or something like that so we could add a message output there. But I have really no idea how the Oni's BSL parser is designed :)
comment:7 by , 6 years ago
Resolution: | → wontfix |
---|---|
Status: | assigned → closed |
I think that if Oni had the ability to recognize undeclared variables, it would already be warning us. As far as I know, this is just another example of BSL being half-baked. That's why I'd recommend a validator instead.
comment:8 by , 3 years ago
Component: | Daodan → Daodan/Win |
---|
Would need some technical input on how this is handled to see whether this is possible.