Hi: A7.5 Comm.
I'm trying to learn how to use structures with A7 to change my code from scripts but with not much success. My problem is accessing and comparing elements. Errors and crash are the norm
I tried samples from the forum, sometimes works...is there a
tutorial for this? Rules to know for structures in lite-C?
Please some direction to follow.
My other working engine is irrlicht 4.1 with DevCpp, no problem
there with structures and pointers, i know the rules.
Are my option are still using C-script with 3dgs and C with irrlicht?
#define MODE_STAND 0;
#define MODE_WALK 1;
typedef struct
{
var health;
var shield;
var count;
var state;
var pathnode;
var lin_speed;
var rot_speed;
var anim_speed;
var vision_range;
var weapon_type;
var weapon;
var weapon_range;
var ammo;
ENTITY* model;
} entity3d;
function main()
{
entity3d enemy;
enemy.model = ent_create ("mymodel.mdl", vector(0,0, 25), NULL);
func(enemy);
}
function func(entity3d* ent)
{
ent.state = MODE_WALK // error!!?
if (ent.state == MODE_WALK) // error!!?
}