Hey it's me again. Sorry for asking you so much stuff, but this time I got no clue, how to solve my problem.
Please have a look at the following code:
#include <acknex.h>
#define dirt 0
#define grass 1
#define stone 2
#define wood 3
struct BLOCK
{
ENTITY* e;
int t;
int dmg;
};
function getSkin(BLOCK* b)
{
if(!b) return "";
switch(b->t)
{
case dirt:
return "texture_dirt.bmp";
case grass:
return "texture_grass.bmp";
case stone:
return "texture_stone.bmp";
case wood:
return "texture_wood.bmp";
case default:
return "texture_error.bmp";
}
}
In general very simple and I excpected it to be able to be compiled without any problems. But that's not the case! Insted of this I get the message, that there would be a syntax error with the "getSkin(..)" function and I don't know why. At first I thought that the missing prototype of the function is the reason for the error bu it isn't. I think Lite-C cannot recognize the type of the parameter.
So I ask you to help me and to tell me what's wrong with the implentation of the function.
Sorry for my messy english ^^
Greetings,
Chris