Function Definition Not Working in PikaScriptShell
Closed this issue · 6 comments
maxgerhardt commented
In the script console, I can't seem to be able to define a function that will be executed later due to a syntax error (?)
>>> def a():
... print("A")
... print("B")
...
[error]: Syntax error.
>>>
>>> a()
>>>
This code works in a Python shell as regular.
>>> def a():
... print("A")
... print("B")
...
>>> a()
A
B
maxgerhardt commented
Aha, with 4 spaces instead of 3 (which python did not need), I can get a function definition but it still won't execute correctly.
>>> def a():
... print("A")
...
>>> a()
>>>
pikasTech commented
function define is only supported in main.py
maxgerhardt commented
Should we leave this issue open as "Support function definition in pikaScriptShell?
pikasTech commented
Should we leave this issue open as "Support function definition in pikaScriptShell?
Okay, it can be a TODO issue for the next release version. #88
maxgerhardt commented
Confirmed solved after update.