When using structs in KSP scripts, an error occurs indicating that a struct field has not been declared, even though it has been correctly declared.
Steps to Reproduce:
Create a new script using the following code:
on init
struct simple_struct
declare int_var
declare ~float_var
end struct
declare &simple_struct new_structs[2]
new_structs[0].int_var := 1
new_structs[0].float_var := -1.0
end on
Run the script in Sublime Text with the SublimeKSP plugin.
Expected Behavior:
The code should execute without errors since the 'float_var' field is correctly declared in the 'simple_struct' struct.
Actual Behavior:
An error is thrown:
new_structs.float_var has not been declared! (line 16)
new_structs(0).float_var := 1.0
main script: 9
Screenshot:
Additional Information:
The error occurs only for fields declared with a tilde ('~') when a struct array is declared. Fields declared without a tilde work correctly.
When using structs in KSP scripts, an error occurs indicating that a struct field has not been declared, even though it has been correctly declared.
Steps to Reproduce:
Create a new script using the following code:
Expected Behavior: The code should execute without errors since the 'float_var' field is correctly declared in the 'simple_struct' struct.
Actual Behavior: An error is thrown:
Screenshot:
Additional Information: The error occurs only for fields declared with a tilde ('~') when a struct array is declared. Fields declared without a tilde work correctly.