Page 1 of 1

typedef struct doesn't work?

PostPosted: Wed Oct 12, 2011 9:16 pm
by EvanBlack
Why doesn't this code work? Is it just not allowed in the script?

Code: Select all
typedef struct Object(
    char o_Name[30];
    int o_nID;
    int o_nX;
    int o_nY;
    int o_Anim;
    ) Object;



This crashes gE:

Code: Select all
struct Object(
    char o_Name[30];
    int o_nID;
    int o_nX;
    int o_nY;
    int o_Anim;
    );

Re: typedef struct doesn't work?

PostPosted: Wed Oct 12, 2011 9:17 pm
by skydereign
Switch the () with {}.

Re: typedef struct doesn't work?

PostPosted: Wed Oct 12, 2011 9:20 pm
by EvanBlack
thats what I thought it was, but where I was getting my reference was using ()