typedef struct doesn't work?

You must understand the Game Editor concepts, before post here.

typedef struct doesn't work?

Postby EvanBlack » Wed Oct 12, 2011 9:16 pm

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;
    );
Last edited by EvanBlack on Wed Oct 12, 2011 9:19 pm, edited 1 time in total.
(\__/) ( Soon... The world)
(O.o )< will be mine!____)
(> < )
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Bunny Overlord 2012!
EvanBlack
 
Posts: 202
Joined: Fri Sep 30, 2011 10:17 am
Score: 19 Give a positive score

Re: typedef struct doesn't work?

Postby skydereign » Wed Oct 12, 2011 9:17 pm

Switch the () with {}.
User avatar
skydereign
 
Posts: 3510
Joined: Mon Jul 28, 2008 8:29 am
Score: 589 Give a positive score

Re: typedef struct doesn't work?

Postby EvanBlack » Wed Oct 12, 2011 9:20 pm

thats what I thought it was, but where I was getting my reference was using ()
(\__/) ( Soon... The world)
(O.o )< will be mine!____)
(> < )
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Bunny Overlord 2012!
EvanBlack
 
Posts: 202
Joined: Fri Sep 30, 2011 10:17 am
Score: 19 Give a positive score


Return to Advanced Topics

Who is online

Users browsing this forum: No registered users and 1 guest