I'm trying to create a function that should return a short. Here is my test code:
Code:
short testfunc()
{
return 100;
}
int main()
{
testfunc();
}
This results in an error:
Quote:
Error in 'MAIN' line 55: machine code generator: cannot translate SETRETV:::SHORT
< return 100; >
Am I doing something very stupid?
The manual says this:
Quote:
While C-Script can only return a var, lite-C, C, or C++ can return any variable or pointer type. Instead of "function", the function is then defined with the returned type, like float, ENTITY*, or whatever.