wiremod/wire

String:length() function outputting string value instead of number

Titanic4 opened this issue · 0 comments

Describe the bug
String:length() function of Expression 2 is returning string instead of number. This results in existing E2 chips utilizing the function to not work at all. The official E2 wiki even tells the user that the number should be returned after executing the function. The issue seems to be seen on this line:

e2function string string:length()

To Reproduce
Steps to reproduce the behavior:

  1. Make new Expression 2 with the following code and try to compile it:
@name String:length() test
@inputs 
@outputs Number

Number = "test":length()
  1. See error

Expected behavior
The script should compile successfully without any errors related to the mentioned function.