#include <acknex.h>

This have to be at the top of your script, that defines all the STRUCTS like ENTITY, BMAP, SOUND....