C# compile errors in NeoModLoader
C# compile errors in NeoModLoader
Section titled “C# compile errors in NeoModLoader”If Player.log contains a compiler code such as:
error CS0103error CS0117error CS0246the mod has a compile-time problem. Fix that before debugging runtime behavior.
First checks
Section titled “First checks”- Read the first compiler error in the mod’s compile block.
- Note the
CSxxxxcode and the file/line if present. - Fix missing names/types/members before chasing later errors; one early syntax/type failure can create many secondary messages.
- Confirm that the API/member you are calling exists on the version actually loaded by the game.
- Run again and make sure the compiler-error group disappears.
Common categories
Section titled “Common categories”CS0103— a name is not available in the current context.CS0117/CS1061— a type/object does not expose the member you tried to call.CS0246— a type or namespace could not be resolved.- syntax codes — often produce a cascade; start with the earliest one.
These descriptions are navigation hints, not a substitute for the full compiler message.
Version-sensitive API
Section titled “Version-sensitive API”When a missing member belongs to NeoModLoader, WorldBox internals or PoliticalWorldAPI, compare your code with the runtime/version shown in the log. Do not silently replace a missing member with one remembered from another version.
Use the API Explorer for the currently verified PoliticalWorldAPI baseline.