Macaw OS C reference

Function levelentityhas

#include <macawlevel.h>
int levelentityhas(
    int level,
    const char *class_,
    int i,
    const char *field
);

Tells you whether an entity has a field, and what kind of value it holds.

Parameters

levelint
The level.
class_const char *
The class, or NULL for every entity.
iint
Which one of them, from 0.
fieldconst char *
The field's name, like "value".

Returns int

0 if there's no such field, 1 for a number, 2 for text, or 3 for true or false.

In Entities, with levelentitycount, levelentity, levelentitynum, levelentitytext, levelentityfield.