Thanks DJBMASTER,
after removing the "struct" part, this is the code I use at the moment.
It stil crashes though.
#include <acknex.h>
#include <default.c>
typedef struct {
int Volume;
int Mass;
} Body_Struct;
Body_Struct* Ptr_Slot1 = {Volume = 10; Mass = 10;}
Body_Struct* Ptr_Slot2 = {Volume = 20; Mass = 20;}
typedef struct {
int Price;
Body_Struct* Pointer1;
Body_Struct* Pointer2;
} Geometry_Struct;
Geometry_Struct Geometry1;
Geometry1.Price = 99.95;
Geometry1.Pointer1 = Ptr_Slot1;
Geometry1.Pointer2 = Ptr_Slot2;
function main();
function main()
{
camera.z = 1000;
if (Geometry1.Pointer1.Mass == 10) {camera.z = 20;}
}
The problem then propably lies with the if statement.
I believe lite-C does not have a special command to differentiate between a pointer and the value the pointer points to.