When attempting to perform any math operation that involves multiple return-value functions, Skript throws an error and the operation fails.
Server version/platform: Paper 1.12.2-1606
Skript version: 2.4.1 & 2.5-alpha-3
Tested with no addons installed.
Here is the test script I created to demonstrate this issue:
function getANumber() :: number:
return 2
command /testFuncReturn:
trigger:
set {_test} to getANumber() + getANumber()
send "%{_test}%" to the player
The command should send the number 4 to the player, but instead sends nothing.
using
set {_test} to (getANumber()) + (getANumber())
works, so it seems like you must surround both with ()
it is a long known skript bug I guess
Might be worth mentioning that the following parses and works correctly:
function getNum() :: number:
return 10
set {_result} to getNum() + getNum() + 1
Most helpful comment
using
set {_test} to (getANumber()) + (getANumber())works, so it seems like you must surround both with ()
it is a long known skript bug I guess