Closed Jest0r closed 2 years ago
Type methods don't seem to work from include files.
Example:
rem --- character.bas --- TYPE player hp AS INT SUB hit(amount AS INT) STATIC THIS.hp = THIS.hp - amount END SUB END TYPE
rem --- main.bas --- INCLUDE "character.bas" DIM p1 AS player p1.hp = 30 CALL p1.hit(5) PRINT p1.hp
This results in the following error:
main.bas:5.0: ERROR: Unknown identifier: p1
moving the TYPE to the main .bas file works, accessing the TYPE variables works as well. The problem seems to appear with SUBs and FUNCTIONs.
Fixed in v3.0.6
Type methods don't seem to work from include files.
Example:
This results in the following error:
moving the TYPE to the main .bas file works, accessing the TYPE variables works as well. The problem seems to appear with SUBs and FUNCTIONs.