TarCV / botc

Fork of Dusk's botc compiler *OPEN FOR ADOPTION*
Other
1 stars 0 forks source link

Fix crash on unknown variable #8

Closed TarCV closed 4 years ago

TarCV commented 4 years ago

Fix #2

ghost commented 4 years ago

Using https://github.com/TarCV/debotc/blob/master/debotc_defs.bts as botc_defs.bts and mentioning an undeclared $global6 variable anywhere in the source:

Parsing script...
Declared global variable #0 $global0
Declared global variable #1 $global2
Declared global variable #2 $global3
Declared global variable #3 $global4
Declared global variable #4 $global5
Declared global variable #5 $globalArray1
error: crashbot.botc:14:11: unknown variable $global6

It works as intended.

TarCV commented 4 years ago

Thank you. Merged.

Does botc_defs from this repository work for you? The one from debotc repo is good for debugging as it allows compiling sources produced by debotc, but it might lack some fixes or updates.

ghost commented 4 years ago

It doesn't work when compiling the decompiled crashbot source, that is why I used the debotc one.

ghost commented 4 years ago
Parsing script...
Declared global variable #0 $global0
Declared global variable #1 $global2
Declared global variable #2 $global3
Declared global variable #3 $global4
Declared global variable #4 $global5
Declared global variable #5 $globalArray1
error: crashbot.botc:27:20: IsSpectating returns an incompatible data type