total = nil function tax(percent,num) total = num * percent end tax(0.5,1255) -- line which errors
Output:
21:29:34.173 - No method name passed in __namecall for Object
I have no idea why this is happening. I tried this in the output itself and it worked, but when i try using it through a script it just calls out that error.
Help would be appreciated, this is really frustrating.
Not sure where you put the script.. When I put it into the server script service it worked fine.. Test the below in a script in the server script service. Don't use a local script.
total = nil function tax(percent,num) total = num * percent return total end print(tax(0.5,1255))