Advanced API
Handles and Return Values
Never add to a handle, cast it to a pointer, serialize it as permanent identity or pass it to a different world. Retain your own stable gameplay ID separately. A generation protects against accidental slot reuse but cannot repair wrong ownership in application code.
| API | Contract |
|---|---|
| Creator handle > 0 / 0 | Created identity / failure for raw resource constructors. |
| Command 1 / 0 | Success / failure for raw boolean commands. |
| Property scalar | May legitimately be zero; consult its own contract and error channel. |
| Query struct / array | Inspect error_code or native error channel before interpreting a miss or empty array. |