Cannot do arithmetic involving 2 or more return value functions #3046
Labels
bug
An issue that needs to be fixed. Alternatively, a PR fixing an issue.
completed
The issue has been fully resolved and the change will be in the next Skript update.
priority: lowest
"Nice to have" updates that are not required (tiny low impact bug fixes or QoL enhancements).
Description
When attempting to perform any math operation that involves multiple return-value functions, Skript throws an error and the operation fails.
Steps to Reproduce
Sample Error:
[17:39:50 ERROR]: Functions cannot be used here (or there is a problem with your arguments). (testscript.sk, line 6: set {_test} to getANumber() + getANumber()')
Server Information
Server version/platform: Paper 1.12.2-1606
Skript version: 2.4.1 & 2.5-alpha-3
Tested with no addons installed.
Additional Context
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.
The text was updated successfully, but these errors were encountered: