29.07.2014, 18:28
Hello.
How can I allow a function to return two different types? IE if you specify returntype=1, it gives you a string return, if returntype=2 it will return a number instead. I'm trying to do multiple stuff in one function so I don't have to create two or three different ones.
Unfortunately, I currently get the error "error 079: inconsistent return types"
How can I allow a function to return two different types? IE if you specify returntype=1, it gives you a string return, if returntype=2 it will return a number instead. I'm trying to do multiple stuff in one function so I don't have to create two or three different ones.
Unfortunately, I currently get the error "error 079: inconsistent return types"