Works OK for me, as long as Ive got #include <acknex.h> at the top
and have inserted level_load(NULL); into the start of main,
otherwise its all your code.
The below code is the ENTIRE *.c file I am testing with, if its different
to yours, post the COMPLETE file of your demo code.
#include <acknex.h>
#include <default.c>
//
#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 func(entity3d* ent);
function main()
{
level_load(NULL);
entity3d enemy;
enemy.model = ent_create ("mymodel.mdl", vector(0,0, 25), NULL);
func(enemy);
}
function func(entity3d* ent)
{
VECTOR v1;
ent.state = MODE_WALK;
v1.x = ent.model.x; // no Error and crash! for me
vec_set (v1.x, ent.model.x); // no Error and crash! for me
ent.model.y -= 1; // no Error and crash! for me
}