registerMod returns 0, or RegisterMod returns false |
Bad id (not ASCII [a-z0-9._-], shorter than 3 or longer than 64 bytes); the id is already registered (scripts: it belongs to a C plugin); 64 mods already; a hash collision with another id. NightCoop's log says which |
NightCoopSdkGet returns NULL, or Version() is 0 |
The SDK is switched off (sdk), or this NightCoop has no interface of the version you asked for |
GetModuleHandle finds no NightCoop.dll |
NightCoop is not loaded. Look from the game thread after your Main, not in DllMain; plugins load in an unknown order |
| Nothing arrives at the partner |
The partner has not registered the same id with the same protocol; or its passport has not arrived yet (PeerHasMod = -2); or you are not in a session. send returns 0 when nobody has the mod |
send returns NCSDK_E_STATE |
No session, or the passport of that very peer is not known yet. Wait for PEER_MOD |
send / stateSet returns NCSDK_E_LIMIT |
Over 32 KiB/s or 120 messages/s (bursts up to 4x). Send on change, use a stream or LATEST_ONLY, send less |
send returns NCSDK_E_ARG |
Payload too large (1024 bytes unreliable, 16384 reliable), empty id, bad channel or handle |
Guest stateSet changes nothing |
A guest only asks. The value changes when the host accepts and stateChanged arrives. The host's stateRequest hook may have refused (a log line on both sides). If the host has not answered the mods check yet you get NCSDK_E_STATE; if the host lacks the mod, NCSDK_E_DENIED |
Any function returns NCSDK_E_DENIED, the log says "uses what it did not declare" |
The permission flag is missing in RegisterMod (NCSDK_MOD_USES_*, SPAWNS_ENTITIES, CHANGES_QUESTS) |
send, stateSet, entitySetState return NCSDK_E_DENIED in a session |
The host switched mods off for the session (sdk_session) |
SetEntityState returns NCSDK_E_DENIED |
You are not the owner. Check EntityIsMine(entity) == 1 |
SetEntityState returns NCSDK_E_UNKNOWN |
NightCoop does not sync that entity (it is purely local) |
| The partner never gets the entity state |
Their mirror is not there yet (the value waits and arrives when it appears); or the partner does not have the mod with the same protocol; or the sdk_entity_state switch is off |
| No events in redscript |
Listen returned false (the function must take exactly one ref<NightCoopSdkEvent>); the target died with the world and you did not Listen again; or you registered with the wrong id. Without Listen, call PollEvent |
| No events in C |
A hook left NULL sends items to the poll queue (pollEvent); you register hooks but the mod never polls |
Unsupported |
That part (pose, actions, spawns) is not in this NightCoop build |
| Events are missing under heavy traffic |
The poll queue holds 1024 items per mod and drops the oldest. Poll every frame or use hooks / Listen |
| redscript does not compile after adding NightCoop code |
You copied NightCoop's .reds files into your mod (duplicate definitions), or you used NightCoopSdk outside @if(ModuleExists("NightCoop")) |
| A part of co-op does nothing with your mod installed, nothing in the SDK log |
Your mod replaces a function co-op relies on. Look for hooks: lines in NightCoop's log and logs/nightcoop-hooks.txt; if NightCoop cannot see it, check the list in do-not-hook.md |
| Both players get a note about a missing mod |
Your mod has NEEDED_BY_ALL and the partner lacks it or has another protocol. Switch sdk_mods_check off to hide the note while testing |