struct question
Posted: Wed Sep 06, 2006 10:47 pm
using typedef and struct is all new to me at this point. Here is what I have done.
In Global Code
For some reason the e1 variable is not global. When I try to access the "fields" on it from an actors script it has a value of 0. If I set it in the actors script (instead of in global code) then it works.
Am I doing something wrong or not doing something?
In Global Code
- Code: Select all
typedef struct stElement
{
int var1;
int var2;
} Element;
Element e1;
e1.var1 = 5;
e1.var2 = 10;
For some reason the e1 variable is not global. When I try to access the "fields" on it from an actors script it has a value of 0. If I set it in the actors script (instead of in global code) then it works.
Am I doing something wrong or not doing something?