Project

General

Profile

Bug #834

Transpiler mixing up Variable names with Function names

Added by Phil Bell over 2 years ago. Updated over 2 years ago.

Status:
New
Priority:
Normal
Assignee:
AOZ Developers
Target version:
Start date:
09/26/2021
Due date:
% Done:

0%

Estimated time:
Affected version:

Description

When you have a variable named the same as a function name, albeit with underscores '_' in the place of spaces....

Variable : PLAYER_NAME$
Function : Player Name$()

If you pass PLAYER_NAME$ into an instruction - the transpile is actually using the Player Name$() function instead of the variable

Here is an example of the generated code in the application.js

        // UI Value "UIPlayerName", PLAYER_NAME$
        aoz.sourcePos="0:7:0";
        aoz.ui.setValue( { id: "UIPlayerName", value: this.aoz.player.getPlayerPropertyValue('playername')  } );```
#1

Updated by Brian Flanagan over 2 years ago

  • Assignee set to AOZ Developers

Verified. I had a similar problem when I was setting a variable called Shape$ .
Apparently, it got an error because it was being confused for the Shape instruction.

Also available in: Atom PDF