Allow different return types for 1 function
#1

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"
Reply


Messages In This Thread
Allow different return types for 1 function - by Redirect Left - 29.07.2014, 18:28
Re: Allow different return types for 1 function - by Kyle - 29.07.2014, 18:36
Re: Allow different return types for 1 function - by Redirect Left - 29.07.2014, 18:39
Re: Allow different return types for 1 function - by Kyle - 29.07.2014, 18:45
Re: Allow different return types for 1 function - by Redirect Left - 29.07.2014, 18:47
Re: Allow different return types for 1 function - by Kyle - 29.07.2014, 18:52

Forum Jump:


Users browsing this thread: 1 Guest(s)