Skip to content

sc_actors_v1.local_player

Your player: *out_actor_id, the id the game’s client player record names your actor by (the id the game resolves to your actor), and *out_entity_id, your entity’s id (the same as spawn.entities’ local_player_id; use it with teleport.spatial and spawn.entities). Both 0 on failure. Either pointer may be NULL to skip it, not both. SCO_NOT_FOUND: you haven’t spawned yet. Read-only: no self; a failure’s reason is last_error(NULL, …).

sco_result (*)(uint64_t *, uint64_t *)

Service index

Property Value
Symbol sc_actors_v1.local_player
Record ID sc-actors-v1-local-player
Service game.actors
Table sc_actors_v1
Version macro SC_ACTORS_VERSION_1_1
Packed table version 65537
Since / availability size >= 16; 1.0
Complete member extent (x64 bytes) 16
Table size (x64 bytes) 56

Header source

sco_result (*local_player)(uint64_t* out_actor_id, uint64_t* out_entity_id);
Your player: *out_actor_id, the id the game’s client player record names your actor by (the id the game resolves to your actor), and *out_entity_id, your entity’s id (the same as spawn.entities’ local_player_id; use it with teleport.spatial and spawn.entities). Both 0 on failure. Either pointer may be NULL to skip it, not both. SCO_NOT_FOUND: you haven’t spawned yet. Read-only: no self; a failure’s reason is last_error(NULL, …).

Absent table: query_service NOT_FOUND; missing operation capability: UNAVAILABLE; invalid/released self: BAD_ARG. See method detail for game failures. 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 NPC tracking; entity IDs are session values. Internal allocation unspecified.

Game thread only (WRONG_THREAD elsewhere); last_error any thread. Recursive reentrancy unspecified.

unspecified

unspecified

No in-flight cancellation entrypoint; owned NPCs removed on ordinary unload/non-retained crash cleanup; despawn starts deferred removal. 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_actors.h
(*local_player)
cpp typed-wrapper include/scosdk/game/actors.hpp
return t_ && Covers(t_->size, offsetof(sc_actors_v1, local_player)) && t_->local_player ? t_->local_player(&actorId, &entityId) : SCO_UNAVAILABLE;
csharp typed-wrapper sdk/csharp/Sco.Sdk/Game/Actors.cs
ScoResult r = !Covers(8) || _t->local_player == null ? ScoResult.Unavailable : _t->local_player(&a, &e);
lua typed-wrapper plugins/lua/sco_lua_game.c
const sco_result r = GAME_MEMBER(a, sc_actors_v1, local_player) ? a->local_player(&actor, &entity) : 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.