Skip to content

sc_entities_v1.class_of

The entity’s class name (the name spawn takes), NUL-terminated, with the size handshake (*inout_size: capacity in; bytes written, or needed with SCO_TOO_MANY, out). SCO_NOT_FOUND: the entity isn’t streamed in. SCO_UNAVAILABLE: no “game.entities.class_of”. SCO_FAILED: the game faulted or the name isn’t a plausible class name. Read-only: no self; a failure’s reason is last_error(NULL, …). Implementation clears out[0] when capacity > 0 and initializes inout_size to 0 before failure checks.

sco_result (*)(uint64_t, char *, uint32_t *)

Service index

Property Value
Symbol sc_entities_v1.class_of
Record ID sc-entities-v1-class-of
Service game.entities
Table sc_entities_v1
Version macro SC_ENTITIES_VERSION_1_1
Packed table version 65537
Since / availability size >= 24; 1.0
Complete member extent (x64 bytes) 24
Table size (x64 bytes) 96

Header source

sco_result (*class_of)(uint64_t entity_id, char* out, uint32_t* inout_size);
The entity’s class name (the name spawn takes), NUL-terminated, with the size handshake (*inout_size: capacity in; bytes written, or needed with SCO_TOO_MANY, out). SCO_NOT_FOUND: the entity isn’t streamed in. SCO_UNAVAILABLE: no “game.entities.class_of”. SCO_FAILED: the game faulted or the name isn’t a plausible class name. Read-only: no self; a failure’s reason is last_error(NULL, …). Implementation clears out[0] when capacity > 0 and initializes inout_size to 0 before failure checks.

Absent table: query_service NOT_FOUND; missing operation capability: UNAVAILABLE (alive: 0); invalid/released self: BAD_ARG. Additional failures/output state unspecified unless described in the buffer contract.

Absent table: query_service NOT_FOUND

Caller buffers; no allocation crosses boundary. Host owns entity/watch tracking; IDs are session values. Internal allocation unspecified.

Game thread only (WRONG_THREAD elsewhere, alive returns 0); last_error any thread. Recursive reentrancy unspecified except unwatch in callback.

unspecified

unspecified

No in-flight cancellation entrypoint; owned entities removed and watches ended on ordinary unload/non-retained crash cleanup, except kept entities. Retained-provider faults skip owner resource-release hooks and require restart; backing resources remain retained, not safe for cached calls.

Status labels are copied verbatim from the catalogue: direct is native access; typed-wrapper is wrapper-backed; restricted is a subset/adaptation; unsupported means no supported route is established. No status implies universal safety.

Language Catalogue status Source evidence / wrapper tokens
c direct include/sc_entities.h
(*class_of)
cpp typed-wrapper include/scosdk/game/entities.hpp
sco_result r = t_->class_of(id, s.data(), &size);
csharp typed-wrapper sdk/csharp/Sco.Sdk/Game/Entities.cs
ScoResult r = Storage.Sized((buf, size) => ((ScEntitiesV1*)t)->class_of(id, buf, size), out byte[] b);
lua typed-wrapper plugins/lua/sco_lua_game.c
const sco_result r = GAME_MEMBER(e, sc_entities_v1, class_of) ? e->class_of(id, name, &size) : SCO_UNAVAILABLE;

None identified in the catalogue; this is not proof none can exist.

ABI pins prove layout, not semantic behavior or a live game session.