Skip to content

Latest commit

 

History

History
19 lines (14 loc) · 638 Bytes

0118.md

File metadata and controls

19 lines (14 loc) · 638 Bytes

0118: Unexpected value to return

Compiler found a value that can't be returned from a function. Functions can only return numbers (integer or float), strings, or single variables. Arrays or other complex values are not supported. Also, you can't put random words after return keyword:

function foo  
    return value // Error: Unexpected value to return: value
end

Possible solutions:

  • for each corresponding return type, provide a correct value that is either a number or a string, or a variable of the same type
function foo
  return 42
end