#plugins-dev-chat

1 messages · Page 206 of 1

celest thorn
#

or else if you don't know how to that code you could try on dnspy edit the code and then check the IL

#

and copy it

#

🧠

hearty shard
#

true...

celest thorn
#

brain moment

hearty shard
#

how do i do a continue;

#

like

celest thorn
hearty shard
#

how do i get the loops continue

#

ik how to jump but not specifically for a foreach loop

celest thorn
#

the continue

#

here the example

#

it sets a index at the start and uses that

#

how you would do the same in assembly

#

finally the knowledge of assembly comes useful

hearty shard
celest thorn
hearty shard
#

oh

#

i thought you needed to do more than just go back to the start

#

lmao

celest thorn
#

see this

#

br.s is the if it is true

#

and if it is it goes to the label

#

IL_0071

hearty shard
#

i see...

#

okayh

celest thorn
#

why do i feel so smart saying this shit

#

🧠

#

AND WHY I CAN UNDERSTAND IT

#

im cursed with the knowledge of IL and assembly

#

ig thats why

hearty shard
#
private static IEnumerable<CodeInstruction> Transpiler(IEnumerable<CodeInstruction> instructions, ILGenerator generator)
    {
        CodeMatcher matcher = new CodeMatcher(instructions, generator)
            .MatchEndForward(new CodeMatch(CodeInstruction.Call(typeof(PlayerRolesUtils), nameof(PlayerRolesUtils.GetTeam), [typeof(ReferenceHub)])))
            .CreateLabel(out Label skip)
            .Insert(
                new CodeInstruction(OpCodes.Ldloc_S),
                CodeInstruction.Call(typeof(RoundEndIgnorePatch), nameof(IsPlayerIgnored)),
                new CodeInstruction(OpCodes.Brtrue_S, skip));

        return matcher.InstructionEnumeration();
    }
#

i still need to load the correct local var

#

but

#

that should be it?

#

or-?

celest thorn
#

ig?

hearty shard
#

roger that

soft depot
#

do keep in mind that for foreach loops, you sometimes have to get weird properties etc... cuz the enumerator of the foreach loop can be a custom one, like List<>.IEnumerator or something

celest thorn
#

she is not creating a loop

#

just using an existent one

hearty shard
#
.locals init (
        [0] int32 V_0,
        [1] class RoundSummary roundSummary,
        [2] int32 num1,
        [3] int32 num2,
        [4] int32 num3,
        [5] int32 num4,
        [6] int32 num5,
        [7] int32 flamingos,
        [8] float32 num6,
        [9] float32 num7,
        [10] int32 num8,
        [11] class [LabApi]LabApi.Events.Arguments.ServerEvents.RoundEndingConditionsCheckEventArgs ev1,
        [12] bool flag1,
        [13] bool flag2,
        [14] bool flag3,
        [15] class [LabApi]LabApi.Events.Arguments.ServerEvents.RoundEndingEventArgs ev2,
        [16] string str,
        [17] bool showSummary,
        [18] int32 num10,
        [19] valuetype [System.Core]System.Collections.Generic.HashSet`1/Enumerator<class ReferenceHub> V_19,
        [20] class ReferenceHub allHub,
        [21] valuetype PlayerRoles.Team V_21,
        [22] valuetype [mscorlib]System.TimeSpan V_22
      )
#

[20} is the ref hub

#

now i just

#

how would i dynamically get that

celest thorn
hearty shard
#

yes but

celest thorn
hearty shard
#

yk what i mean

#

💔

celest thorn
#

idk what you mean

hearty shard
#

20 can change anytime nw decides to be goofballs

celest thorn
#

you cannot do anything about that

soft depot
#

maybe the local builder has access to all the variables on the stack?

hearty shard
soft depot
#

wait no

#

ILGenerator

#

anyways

celest thorn
#

im pretty sure you cannot

soft depot
#

I'll go check

hearty shard
#

RAAAA

celest thorn
#

but i mean you would get an error

#

for invalid IL

#

so

#

who cares

hearty shard
#

ok but like

celest thorn
#

and on god nw never changes args

hearty shard
#

i cba to change this once ive already done this

celest thorn
#

its more likely you will see your code break because they renamed it

#

than changed args

hearty shard
#

then the index number would change

celest thorn
#

yea

restive turret
celest thorn
restive turret
#

you can also just do
rsa.SignData()
and
rsa.VerifyData

#

and append the data or something

celest thorn
restive turret
#

(just ensure you know where stuff are)

celest thorn
#

and im most likely gonna work just with rounds

#

so all of the user data is like rounds

restive turret
#

obv you need to save locally the GUID and the Public RSA

celest thorn
#

because in this way its harder to fake data

celest thorn
#

idea was

Player Storage has list of rounds they played

Rounds have all of the info for each player who played

The backend would just verify rounds

#

so in this way its way smarter and harder to fake data 🧠

#

but yea really thanks slem :3

#

and eve hope the stuff works but by seeing you aren't answering ig it worked

hearty shard
#

no it didnt

#

System.Exception: Wrong null argument: ldloc.s NULL

#

oh

#

IM STUPID

#

i was doing the change on the wrong patch lmao

celest thorn
#

Second argument needs to be specified

hearty shard
#

yeah i did change on the wrong thing

#

it works

#

ok it crashed

#

damn

soft depot
#

ok so eve

#

IN THEORY

#

you could figure out what arguments are on the stack

#

with a lot of shenanigans

hearty shard
#

yeah um its just crashing now

#

[2026-04-07 16:19:59.696 +02:00] [STDOUT] =================================================================
[2026-04-07 16:19:59.696 +02:00] [STDOUT] at <unknown> <0xffffffff>
[2026-04-07 16:19:59.696 +02:00] [STDOUT] at UnityEngine.Component:GetComponentFastPath_Injected <0x00077>
[2026-04-07 16:19:59.696 +02:00] [STDOUT] at UnityEngine.Component:GetComponentFastPath <0x0005a>
[2026-04-07 16:19:59.697 +02:00] [STDOUT] at UnityEngine.Component:GetComponent <0x00052>
[2026-04-07 16:19:59.697 +02:00] [STDOUT] at Mirror.NetworkBehaviour:get_netIdentity <0x00042>
[2026-04-07 16:19:59.697 +02:00] [STDOUT] at Mirror.NetworkBehaviour:get_isLocalPlayer <0x0001a>
[2026-04-07 16:19:59.697 +02:00] [STDOUT] at LabApi.Features.Wrappers.Player:CreatePlayerWrapper <0x00062>
[2026-04-07 16:19:59.698 +02:00] [STDOUT] at LabApi.Features.Wrappers.Player:Get <0x0007a>
[2026-04-07 16:19:59.698 +02:00] [STDOUT] at SecretAPI.Patches.Features.RoundIgnoreCountPatch:IsPlayerIgnored <0x0001a>
[2026-04-07 16:19:59.698 +02:00] [STDOUT] at <>c:RoundSummary+c.<UpdateTargetCount>b__52_0_Patch0 <0x00022>
[2026-04-07 16:19:59.698 +02:00] [STDOUT] at Utils.NonAllocLINQ.HashsetExtensions:Count <0x00064>
[2026-04-07 16:19:59.698 +02:00] [STDOUT] at RoundSummary:UpdateTargetCount <0x0015a>
[2026-04-07 16:19:59.699 +02:00] [STDOUT] at RoundSummary:Start <0x002da>

#

interesting

#

Player.Get(hub).RoundIgnoreStatus.HasFlagFast(RoundIgnoreStatus.ScpTargetCount);

#

this causes crash in unity

#

wtf

restive turret
#

player deleted?

hearty shard
# restive turret player deleted?
public void UpdateTargetCount()
  {
    if (!NetworkServer.active)
      return;
    this.TargetCount = ReferenceHub.AllHubs.Count<ReferenceHub>((Func<ReferenceHub, bool>) (hub =>
    {
      Faction faction = hub.GetFaction();
      int num;
      switch (faction)
      {
        case Faction.FoundationStaff:
        case Faction.FoundationEnemy:
          num = 0;
          break;
        default:
          num = faction != Faction.Flamingos ? 1 : 0;
          break;
      }
      return num == 0;
    }));
  }
#
private static Player CreatePlayerWrapper(ReferenceHub referenceHub)
  {
    Player playerWrapper = new Player(referenceHub);
    if (referenceHub.isLocalPlayer)
      Server.Host = playerWrapper;
    return playerWrapper;
  }
hearty shard
#

isLocalPlayer is throwing exception so bad that it crashes the game

celest thorn
#

lol

hearty shard
#

idk how id even fix this

celest thorn
#

like add log

#

before the supposed crash

#

but yea GG nameless idk how tf you do that

#

but GG

hearty shard
#

that crashes it in the C++ i think

celest thorn
#

OH WAIT

hearty shard
#
internal static class RoundIgnoreCountPatch
{
    private const string StateMachine = "<>c";
    private const string UpdateTargetCount = "UpdateTargetCount";

    private static MethodInfo TargetMethod()
    {
        Type nestedType = typeof(RoundSummary).GetNestedTypes(AccessTools.all)
            .FirstOrDefault(currentType => currentType.Name is StateMachine) ?? throw new Exception("Could not locate state machine for RoundSummary::<>c");

        // nestedType.GetMethods(AccessTools.all).ForEach(method => Logger.Debug(method.Name));
        MethodInfo updateCountMethod = nestedType.GetMethods(AccessTools.all)
            .FirstOrDefault(x => x.Name.Contains(UpdateTargetCount)) ?? throw new Exception($"Could not locate {UpdateTargetCount} method in state machine");

        return updateCountMethod;
    }

    private static IEnumerable<CodeInstruction> Transpiler(IEnumerable<CodeInstruction> instructions, ILGenerator generator)
    {
        CodeMatcher matcher = new CodeMatcher(instructions, generator)
            .Start()
            .CreateLabel(out Label skip)
            .Insert(
                new CodeInstruction(OpCodes.Ldarg_0),
                CodeInstruction.Call(typeof(RoundIgnoreCountPatch), nameof(IsPlayerIgnored)),
                new CodeInstruction(OpCodes.Brtrue_S, skip));

        return matcher.InstructionEnumeration();
    }

    private static bool IsPlayerIgnored(ReferenceHub hub) => Player.Get(hub).RoundIgnoreStatus.HasFlagFast(RoundIgnoreStatus.ScpTargetCount);
}
celest thorn
#

you are calling something

restive turret
#

check if refhub is null

celest thorn
#

that the GC doesn't even have

#

refhub is null

#

doesn't even exist

hearty shard
#

why the fuck is it null

celest thorn
#

0xffffffff
Is the max adress you can have

#

so its being discarded by the GC most likely

#

when you get at that point

#

Nameless VS GC

hearty shard
#

ok so the local player is being created

restive turret
#

GC wins as always

hearty shard
#

then gets deleted

#

ig

#

idk

celest thorn
celest thorn
hearty shard
#

ok but why is ReferenceHub::AllHubs returning a null hub at start up

celest thorn
#

or that refhub is like getting destroyed at the same time you are calling it

hearty shard
#

nope not null

#

still crash

#

also it couldnt even be null

#
[2026-04-07 16:29:45.593 +02:00] [STDOUT]       at UnityEngine.Component:GetComponent <0x00052>
[2026-04-07 16:29:45.593 +02:00] [STDOUT]       at Mirror.NetworkBehaviour:get_netIdentity <0x00042>
[2026-04-07 16:29:45.593 +02:00] [STDOUT]       at Mirror.NetworkBehaviour:get_isLocalPlayer <0x0001a>
[2026-04-07 16:29:45.594 +02:00] [STDOUT]       at LabApi.Features.Wrappers.Player:CreatePlayerWrapper <0x00062>
[2026-04-07 16:29:45.594 +02:00] [STDOUT]       at LabApi.Features.Wrappers.Player:Get <0x0007a>
hearty shard
#

if it was null the stacktrace shouldnt go all the way down

restive turret
#

ye the object being destroyed

celest thorn
#

When tf is this getting executed?

restive turret
#

but you keep referencing it

celest thorn
#

but like

hearty shard
celest thorn
#

Why is createPlayerWrapper mentioned?

#

maybe its still not a wrapper?

restive turret
#

basegame aint throwing

hearty shard
#

no its not but

#

its a basegame method

#

its ReferenceHub::AllHubs

#

that has a destroyed object in it

celest thorn
#

can you show the thingy it calls?

hearty shard
#

wait

celest thorn
#

IsPlayerIgnored

hearty shard
#

maybe a NetworkServer.active check

celest thorn
hearty shard
# celest thorn IsPlayerIgnored

private static bool IsPlayerIgnored(ReferenceHub hub)
{
return hub && Player.Get(hub).RoundIgnoreStatus.HasFlagFast(RoundIgnoreStatus.ScpTargetCount);
}

celest thorn
#

Player.Get(hub) maybe null?

#

and check for network active too ig

hearty shard
#

oh hey it DIDNT WORK AGAIN

celest thorn
#

lol

hearty shard
#
[2026-04-07 16:33:17.885 +02:00] [STDOUT] 0x000001F012CDB422 (Mono JIT Code) System.Collections.Generic.GenericEqualityComparer`1<T_REF>:Equals (T_REF,T_REF)
[2026-04-07 16:33:17.885 +02:00] [STDOUT] 0x000001F012C6C794 (Mono JIT Code) System.Collections.Generic.Dictionary`2<TKey_REF, TValue_REF>:FindEntry (TKey_REF)
[2026-04-07 16:33:17.885 +02:00] [STDOUT] 0x000001F012C6C3DB (Mono JIT Code) System.Collections.Generic.Dictionary`2<TKey_REF, TValue_REF>:TryGetValue (TKey_REF,TValue_REF&)
[2026-04-07 16:33:17.885 +02:00] [STDOUT] 0x000001F186572F93 (Mono JIT Code) LabApi.Features.Wrappers.Player:Get (ReferenceHub)
[2026-04-07 16:33:17.886 +02:00] [STDOUT] 0x000001F186572E83 (Mono JIT Code) SecretAPI.Patches.Features.RoundIgnoreCountPatch:IsPlayerIgnored (ReferenceHub)
[2026-04-07 16:33:17.886 +02:00] [STDOUT] 0x000001F0BAC32063 (Mono JIT Code) (wrapper dynamic-method) RoundSummary/<>c:RoundSummary+c.<UpdateTargetCount>b__52_0_Patch0 (RoundSummary/<>c,ReferenceHub)
[2026-04-07 16:33:17.886 +02:00] [STDOUT] 0x000001F186572D25 (Mono JIT Code) Utils.NonAllocLINQ.HashsetExtensions:Count<T_REF> (System.Collections.Generic.HashSet`1<T_REF>,System.Func`2<T_REF, bool>)
[2026-04-07 16:33:17.887 +02:00] [STDOUT] 0x000001F186572C2B (Mono JIT Code) RoundSummary:UpdateTargetCount ()
[2026-04-07 16:33:17.887 +02:00] [STDOUT] 0x000001F0BAC30A3B (Mono JIT Code) (wrapper dynamic-method) RoundSummary/<_ProcessServerSideCode>d__58:RoundSummary+<_ProcessServerSideCode>d__58.MoveNext_Patch0 (RoundSummary/<_ProcessServerSideCode>d__58)
[2026-04-07 16:33:17.887 +02:00] [STDOUT] 0x000001F186572946 (Mono JIT Code) MECExtensionMethods2/<CancelWith>d__4:MoveNext ()
[2026-04-07 16:33:17.887 +02:00] [STDOUT] 0x000001F0B9A174BE (Mono JIT Code) MEC.Timing:FixedUpdate ()
[2026-04-07 16:33:17.888 +02:00] [STDOUT] 0x000001F0B8DCFF48 (Mono JIT Code) (wrapper runtime-invoke)
#

i mean

#

it got further than it did before

restive turret
#

can you do
CL.LogWarn(hub.TryGetComponent(out NetworkIdentity netId))

hearty shard
#

sure

restive turret
#

CL

restive turret
#

is Console.Logger

celest thorn
#

oh

#

lol

restive turret
#

I have that as alias

#

cus Logger can be UnityEngine.Logger too

celest thorn
hearty shard
#

uh

#

no crash

celest thorn
#

hello?

#

what

#

a log fixes all of the problems

hearty shard
#

maybe it didnt actually paste the NetworkServer.active change

celest thorn
hearty shard
#

oop and its gone

tulip kiln
#

why are you fighting with the engine rn

restive turret
#

thats eve

hearty shard
#

no clue

restive turret
#

daily eve projects

celest thorn
#

1v1 no build with the engine

hearty shard
#
[2026-04-07 16:37:32.512 +02:00] [STDOUT] =================================================================
[2026-04-07 16:37:32.512 +02:00] [STDOUT]       at <unknown> <0xffffffff>
[2026-04-07 16:37:32.513 +02:00] [STDOUT]       at UnityEngine.Component:get_gameObject_Injected <0x00069>
[2026-04-07 16:37:32.513 +02:00] [STDOUT]       at UnityEngine.Component:get_gameObject <0x0005a>
[2026-04-07 16:37:32.513 +02:00] [STDOUT]       at UnityEngine.Component:TryGetComponent <0x00022>
[2026-04-07 16:37:32.513 +02:00] [STDOUT]       at SecretAPI.Patches.Features.RoundIgnoreCountPatch:IsPlayerIgnored <0x00042>
[2026-04-07 16:37:32.514 +02:00] [STDOUT]       at <>c:RoundSummary+c.<UpdateTargetCount>b__52_0_Patch0 <0x00022>
[2026-04-07 16:37:32.514 +02:00] [STDOUT]       at Utils.NonAllocLINQ.HashsetExtensions:Count <0x00064>
[2026-04-07 16:37:32.514 +02:00] [STDOUT]       at RoundSummary:UpdateTargetCount <0x0015a>
[2026-04-07 16:37:32.515 +02:00] [STDOUT]       at RoundSummary:Start <0x002da>
[2026-04-07 16:37:32.515 +02:00] [STDOUT]       at System.Object:runtime_invoke_void__this__ <0x00087>
restive turret
#
  • figth with unity
  • fight with slejm
  • call david evil
  • call slejm evil
  • break sercetapi
celest thorn
#

and again the same thing

hearty shard
#

TryGetComponent is throwing exception because hub doesnt exist in unity

restive turret
#

LMAO

hearty shard
#

i assume

restive turret
#

your GO isnt living anymore

celest thorn
hearty shard
#

im assuming so at least

#

idfk

celest thorn
#

My brain rn

#

best way to describe

restive turret
hearty shard
#

ok but

#

why the fuck is the host hub

#

instantly being destroyed

celest thorn
#

WAIT crazy idea

#

does the main menu have it???

#

maybe changing the scene?

hearty shard
#

no it gets to waiting for players

celest thorn
#

maybe it gets called as soon as the scene gets done?

hearty shard
#

and then crashes after

celest thorn
hearty shard
#

because the facility scene is what has RoundSummary no ?

celest thorn
#

are you trying to join?

hearty shard
#

no

celest thorn
#

fuck.

hearty shard
#

i havent even loaded the game

#

thats why im saying its host hub

celest thorn
#

hmm

#

maybe

#

there's an error somewhere else

#

and it leads to the host crashing and then to this crashing?

restive turret
#

well

#

your fav thing now is try catch

hearty shard
#

ok but

#

that wouldnt save it i dont think

#

if the C++ dies

restive turret
#

just

#
catch
{
 // Ignore
}
hearty shard
#

ok but

#

how would that save unitys c++

restive turret
#

cant throw null to your app

#

you can try doing same stuff but like

celest thorn
#

eve i know a solution

#

go kiss the wall

hearty shard
#

so

restive turret
#
try
{
return Player.Get(hub).RoundIgnoreStatus.HasFlagFast(RoundIgnoreStatus.ScpTargetCount);

}
catch
{
 return false;
}
hearty shard
#

yeah im saying that didnt fix it

#

because again

#

its the C++ dying in unity

#

not the C#

#
 0x000001ED0F2FB422 (Mono JIT Code) System.Collections.Generic.GenericEqualityComparer`1<T_REF>:Equals (T_REF,T_REF)
[2026-04-07 16:45:31.062 +02:00] [STDOUT] 0x000001ED0F2802F4 (Mono JIT Code) System.Collections.Generic.Dictionary`2<TKey_REF, TValue_REF>:FindEntry (TKey_REF)
[2026-04-07 16:45:31.063 +02:00] [STDOUT] 0x000001ED0F27FB1B (Mono JIT Code) System.Collections.Generic.Dictionary`2<TKey_REF, TValue_REF>:TryGetValue (TKey_REF,TValue_REF&)
[2026-04-07 16:45:31.063 +02:00] [STDOUT] 0x000001EE82C767B3 (Mono JIT Code) LabApi.Features.Wrappers.Player:Get (ReferenceHub)
[2026-04-07 16:45:31.063 +02:00] [STDOUT] 0x000001EE82C7665B (Mono JIT Code) SecretAPI.Patches.Features.RoundIgnoreCountPatch:IsPlayerIgnored (ReferenceHub)
[2026-04-07 16:45:31.063 +02:00] [STDOUT] 0x000001EDB72A2063 (Mono JIT Code) (wrapper dynamic-method) RoundSummary/<>c:RoundSummary+c.<UpdateTargetCount>b__52_0_Patch0 (RoundSummary/<>c,ReferenceHub)
[2026-04-07 16:45:31.064 +02:00] [STDOUT] 0x000001EE82C764F5 (Mono JIT Code) Utils.NonAllocLINQ.HashsetExtensions:Count<T_REF> (System.Collections.Generic.HashSet`1<T_REF>,System.Func`2<T_REF, bool>)
[2026-04-07 16:45:31.064 +02:00] [STDOUT] 0x000001EE82C763FB (Mono JIT Code) RoundSummary:UpdateTargetCount ()
[2026-04-07 16:45:31.064 +02:00] [STDOUT] 0x000001EDB72A0A3B (Mono JIT Code) (wrapper dynamic-method) RoundSummary/<_ProcessServerSideCode>d__58:RoundSummary+<_ProcessServerSideCode>d__58.MoveNext_Patch0 (RoundSummary/<_ProcessServerSideCode>d__58)
[2026-04-07 16:45:31.064 +02:00] [STDOUT] 0x000001EE82C76116 (Mono JIT Code) MECExtensionMethods2/<CancelWith>d__4:MoveNext ()
[2026-04-07 16:45:31.064 +02:00] [STDOUT] 0x000001EDB60895DE (Mono JIT Code) MEC.Timing:FixedUpdate ()
#

heres the new stacktrace btw

restive turret
#

check if refhub is null

hearty shard
#

its not

restive turret
#

and return false

hearty shard
#

i already checked

restive turret
#

send code

hearty shard
#

return NetworkServer.active && hub != null && Player.Get(hub).RoundIgnoreStatus.HasFlagFast(RoundIgnoreStatus.ScpTargetCount);

restive turret
#

mf

hearty shard
#

it doesnt matter

#

when

#

its the Player.Get(hub) thats throwing the exception

#

hub ISNT null

restive turret
#
if (!NetworkServer.active)
  return false;

if (hub == null)
  return false;

try
{
return Player.Get(hub).RoundIgnoreStatus.HasFlagFast(RoundIgnoreStatus.ScpTargetCount);
}
catch (Exception ex)
{
  Logger.LogError(ex);
 return false;
}
hearty shard
#

still crashes

#

because again

#

the exception happens in the C++

#

[2026-04-07 16:52:11.859 +02:00] [STDOUT] at UnityEngine.Component:GetComponentFastPath <0x0005a>
[2026-04-07 16:52:11.859 +02:00] [STDOUT] at UnityEngine.Component:GetComponent <0x00052>
[2026-04-07 16:52:11.860 +02:00] [STDOUT] at Mirror.NetworkBehaviour:get_netIdentity <0x00042>
[2026-04-07 16:52:11.860 +02:00] [STDOUT] at Mirror.NetworkBehaviour:get_isLocalPlayer <0x0001a>
[2026-04-07 16:52:11.860 +02:00] [STDOUT] at LabApi.Features.Wrappers.Player:CreatePlayerWrapper <0x00062>

restive turret
#

skill issue or something idfk

celest thorn
#

go ask unity engineers

restive turret
#

ye

tulip kiln
#

Can you run the server in a debugger or smth

restive turret
#

fucking nullables

celest thorn
hearty shard
celest thorn
#

we cannot

hearty shard
#

and would the debugger work for the C++ code?

restive turret
#

like 9000% of things happen because untiy just dont care about nullables

tulip kiln
celest thorn
#

here

tulip kiln
#

oh slem

#

slejm*

celest thorn
#

i forget of the j

tulip kiln
#

I thought it was short for SL-something Kek

restive turret
#

unity too

celest thorn
#

SL E-suck M-ass

tulip kiln
#

Can't believe slejm just admitted that sl sucks ass 😔

hearty shard
#

[2026-04-07 16:57:46.675 +02:00] [ERROR] [SecretAPI] System.NullReferenceException: Object reference not set to an instance of an object
at Mirror.NetworkBehaviour.get_isLocalPlayer () [0x00006] in <1bebde0895f14b11be97fb0c4e2cabe4>:0
at LabApi.Features.Wrappers.Player.CreatePlayerWrapper (ReferenceHub referenceHub) [0x00007] in <dcdabc4611d241c3b74aec95f620a184>:0
at LabApi.Features.Wrappers.Player.Get (ReferenceHub referenceHub) [0x0001a] in <dcdabc4611d241c3b74aec95f620a184>:0
at SecretAPI.Patches.Features.RoundIgnoreCountPatch.IsPlayerIgnored (ReferenceHub hub) [0x00022] in <b5d55d0189774eb9b9a26d0454e6cce1>:0

#

OKAY

#

FUCKING FINALLY I GOT SMTH MORE

#

netIdentity is null

#

probably

restive turret
#

yes

celest thorn
#

YIPPE

restive turret
#

thats what i try to say

celest thorn
#

Mirror fault

hearty shard
#

no you said

#

hub is null

celest thorn
#

let me send an email to them

hearty shard
#

but like

#

brah

restive turret
#

everything can be null

celest thorn
#

first for the synclist and now for this

hearty shard
#

i had to make it a prefix

restive turret
#

bc this thing doesnt say "oh the script can be null now"

hearty shard
celest thorn
hearty shard
#

[2026-04-07 17:00:21.275 +02:00] [STDOUT] =================================================================
[2026-04-07 17:00:21.275 +02:00] [STDOUT] at <unknown> <0xffffffff>
[2026-04-07 17:00:21.275 +02:00] [STDOUT] at UnityEngine.Component:GetComponentFastPath_Injected <0x00077>
[2026-04-07 17:00:21.275 +02:00] [STDOUT] at UnityEngine.Component:GetComponentFastPath <0x0005a>
[2026-04-07 17:00:21.276 +02:00] [STDOUT] at UnityEngine.Component:GetComponent <0x00052>
[2026-04-07 17:00:21.276 +02:00] [STDOUT] at Mirror.NetworkBehaviour:get_netIdentity <0x00042>
[2026-04-07 17:00:21.276 +02:00] [STDOUT] at SecretAPI.Patches.Features.RoundIgnoreCountPatch:IsPlayerIgnored <0x0007a>

#

ARE YOU SERIOUS

celest thorn
#

so less setup for people ig

celest thorn
hearty shard
#

ok so netIdentity -> GetComponent check throws exception in C++

#

r u serious

hearty shard
#

how do i even fix that one

#

i cant null check

restive turret
#

cant

hearty shard
#

brah

restive turret
#

send your blame to unity & mirror

hearty shard
#

yk what i can fix it

#

fixed it i think

#

damn

#
private static bool IsPlayerIgnored(ReferenceHub hub)
    {
        if (!NetworkServer.active || !Round.IsRoundStarted)
            return false;

        if (hub == null)
            return false;

        return hub && Player.Get(hub).RoundIgnoreStatus.HasFlagFast(RoundIgnoreStatus.ScpTargetCount);
    }
#

ez

restive turret
#

so you added return false;

#

fgucka

#

sdfs

#

Round.IsRoundStarted

hearty shard
#

yes

#

i mean

#

this does mean that servers that yk

#

do stuff when round isnt started

#

wont have the number reflect

#

but idfc

upper vapor
soft turtle
#

Why does AHP increase above 25?

royal mica
#

"You have given up your right of free speech and personal opinions by signing up"

restive turret
#

I can't get out of this situation

slender depot
#

Why does this line of code create ghost items that can be picked up? It's supposed to store it in the Host's inventory until it's useful

Pickup pickupbase = Player.Get(hub).CurrentItem.DropItem();
Item item = Player.Host.AddItem(pickupbase);```
wary gust
upper vapor
#

try what omega said but this is not a very good idea

#

couldn't you just move the pickups to an unreachable location?

#

-# though that's prone to cleanup items

slender depot
upper vapor
#

Freeze their physics

slender depot
upper vapor
#

= true

spare wharf
#

how to give a specific effect to a Player?

#

EnableEffect is probably the choice but I am unsure of how to get the exact effect needed

unique crane
#

Find the effect in AssemblyCSharp

#

Like

#

MovementBoost

#

AntiScp207

#

And so on

spare wharf
#

if the duration is 0f, is it infinite?

#

or just not applied?

unique crane
#

Yeah I think that 0f is inf

upper vapor
#

correct

#

0 = infinity

#

math professors are malding

slender depot
#

Where do the items that a player picked up go?

#

How are they stored?

hearty shard
#

i think is a thing

restive turret
plain gazelle
#

Any way to change someones role without them seeing the role screen?

spare zodiac
plain gazelle
#

15.0's hud update better make it possible

hearty shard
restive turret
hearty shard
warped prairie
celest thorn
#

Happy Halloween guys

tulip kiln
#

Happy Independence Day 🥳

cosmic echo
#

is there a way for a server to get the client's value of a networked variable?

grand flower
#

no

sinful bronze
#

Happy day

steep shard
#

Why a dummy cant shoot with a shotgun?

carmine prawn
#

Nobody Cares

devout terrace
#

after checking antiscp207's code

#

who wrote this s***t

carmine prawn
#

NW Moment

terse bone
#

just patch it, it was broken and still is

#

the only difference is that they broke it even more

upper vapor
#

i didn't know this was serverhost-chat

restive turret
#

AHP is mistery

warped prairie
#

mystery ❌
Misery check

carmine prawn
#

northwood remake ahp system plz 😭

restive turret
#

nah remove it

slender depot
# hearty shard player.Inventory

I meant to ask what happens with the item itself, does it just get stored as an ItemBase and created again when it's dropped/thrown?

restive turret
#

When you pickup the item the pickup destroyed and added as ItemBase.
When you drop the item it creates a pickup and removes the itembase

celest thorn
#

should i learn rust?

covert flame
#

IIiiiii

#

Have a question

#

That I think I've asked before hol up

unique crane
#

Okay

#

we will wait

#

dont worry

covert flame
#

Can't be bothered

unique crane
#

Ill wait faster

covert flame
#

How do I get the permission group of a user group

#

Currently we rocking this ```cs
UserGroup group = ServerStatic.PermissionsHandler.GetGroup(groupName);

PermissionGroup.DefaultPermissionGroups.TryGetValue(group.Name, out PermissionGroup permissionGroup);

player.UserGroup = group;
player.AddPermissions(permissionGroup.Permissions);

#

The TryGet is returning false

#

Kind seems like we waiting slower lmao

unique crane
#

DefaultPermissionGroups is trolling you

hearty shard
#

😭

sinful bronze
#

@upper vapor Bolton hide or remove website with sl emojies 😭😭😭

#

oh nuh

#

github moment

#

yipppeee

sharp hedge
#

which show hint method should i patch to show the hint with another hint system?

hearty shard
#

or well it depends

#

if ur hint system uses basegame method then you dont want that

#

but otherwise yeah basegame method !!!

obtuse spruce
unique crane
#

This is in LabAPI

obtuse spruce
restive turret
#

Lmao

spring plank
#

Anyone good at operating ced mod here?

#

The support isn’t answering and i need help fast

icy knoll
true quest
#

what's the easiest way to get a player's killer weapon? I was thinking on getting the death message translation and parse it to know the weapon (like 939 claws for example) but pretty sure there's a better way

carmine prawn
#

For Firearm, you can use FirearmDamageHandler and check it Firearm item

true quest
#

Imma try that thx @carmine prawn

covert flame
worn gull
#

Hi! Is it possible to add new commands to a ParentCommand from another plugin? (Plugin x registers 3 commands into a ParentCommand and plugin y wants to add 2 commands to it)
I tried it once, failed 🙁

celest thorn
#

you might be able to hijack it

celest thorn
#

ParentCommand is an abstract of CommandHandler

#

so you should be fine

worn gull
#

Thanks

celest thorn
celest thorn
#

you can do that

#

but it depends

unique crane
#

Getting the Commands list of whatever it is should work too

spring plank
#

do you guys any good time mute plugins?

#

and also can you t mute with cedmod comand thru console

celest thorn
#

should i learn the mess called Rust?

#

Because im reading the doc

#

and im like "why?"

restive turret
#

No

celest thorn
#

im trying to achieve the gods level of speed

#

without crying for malloc and freemem

restive turret
#

AnsiC

celest thorn
#

what the fuck is that

restive turret
#

Or write asm

celest thorn
unique crane
celest thorn
#

i don't wanna die

unique crane
#

C++ has new and delete

#

You silly

celest thorn
#

omg

unique crane
#

But you don't specify allocated bytes xd

restive turret
#

Rust has the same fucking thing

unique crane
#

It does it for you

celest thorn
#

lol

restive turret
#

Just the syntax so ass i can't even read it

celest thorn
#

is so ass

unique crane
#

Rust ass

restive turret
#

The game is good

unique crane
#

Just do pure C

restive turret
#

The lang not

unique crane
#

C dynamic array speedrun any%

celest thorn
unique crane
#

First 2 and half minutes of my exam

#

XD

celest thorn
#

when rust was like becoming popular

covert flame
celest thorn
#

i was so confused

restive turret
unique crane
celest thorn
#

everyone was like "you should code in rust"

covert flame
#

OOohhhh right, i forgot about doing that

unique crane
#

And make issue / PR for it pls

restive turret
#

Plz no

#

Trol

covert flame
#

Is too much effort

celest thorn
celest thorn
restive turret
restive turret
#

Lmao

#

That's funny

#

Also i don't like how in rust you need to recompile everything

#

Even the packages

celest thorn
#

nah idc about that

restive turret
#

I do

celest thorn
#

like

#

i learned a bit of rust

#

to add this to a xenoblade modding project

#

which wasn't too hard

#

imagine going around on maps WITHOUT freecam movement

#

so a bit of it i have the ideas and stuff

#

but like reading the docs scares me trolling

restive turret
#

I was"reading" rust code and most of the time it just "uhh if you say so" and "i guess this how is done"

celest thorn
restive turret
#

When i see js / ts project i just ignore it

#

Noone is paying me enough to touch that shit

celest thorn
#

js a bit more

restive turret
#

I don't like both

celest thorn
#

c# is good for alot of stuff but for web i think js wins

#

nodejs same shit

#

tbh

restive turret
#

And I can write c/c++ but not a lot, ide helps but still not that much as c# do

#

Nodejs can burn

celest thorn
#

lol

#

now that i think about it

restive turret
#

Whoever though running server in JavaScript is such a good idea wasn't the best mental state

celest thorn
#

im gonna be honest

#

i should test something

#

writing in razor

restive turret
#

Test deez

celest thorn
#

a website

celest thorn
#

because honestly i wanna switch db

#

to not use mongo

#

because mongo is fantastic but

#

i need something fast and light

unique crane
#

Mysql

celest thorn
#

die in a fire

#

im not gonna do

#

"WHERE IS MY SkibidiToilet69 IN account"

restive turret
#

Bro

#

Half of those are that

#

Only litedb i know it's basically for c#

covert flame
#

Hmm, so get this right, I was using the nuget package before, but now since I need to publicize it I changed to the .dll from the local admins server right, and so yknow, as one would, I removed the nuget package from my project and referenced the correct .dll file, and obviously, because why would it not, it is pointing to the nuget package location

celest thorn
#

but no Network Capabilities

#

what if i make a system to add network capabilities

restive turret
#

Fym network capibility

celest thorn
#

caps

#

sorry

restive turret
#

So you need basically a server SQL not a file/memory sql

celest thorn
#

on disk space

#

because my concern is more diskspace

restive turret
#

I use LiteDB since I dont need to do sql connands

#

And litedb basically just helps me via fancy linq stuff

celest thorn
#

ig i will stick with mongo

restive turret
#

I mostly do is need file stuff

#

Ofc you can maybe make a wrapper out of it

#

But nyeh

unique crane
celest thorn
#

because i will get muted for it

restive turret
celest thorn
#

WAIT

#

BLAZOR IS EASY

unique crane
#

Yeah

#

It's all same

#

Xml

#
  • generated code
celest thorn
#

like why tf none told me this shit was way better than fuck ass react

#

spending my life there

unique crane
#

I absolutely fucked around assembly

#

Instead of doing shit with 8 bit register with sign to 16 bit

#

I multiplied it signed by 1

unique crane
#

That converts it to 16 bit

pulsar locust
celest thorn
#

ehm

#

ig react still the goat

#

then

pulsar locust
#

Just use something ssr'd

#

that isn't react based

#

React is just bad at ssr

restive turret
#

Just don't use websites

celest thorn
#

and that has support for SSR

pulsar locust
pulsar locust
#

You can't even use states in server rendered stuff and have to jump around server and client with components

#

most other ssr'd frameworks just handle state conversion on the server themselves (such as svelte)

#

Solidstart does too iirc

celest thorn
#

which is the same one used on a cutscene

#

thank god nintendo you put it here for all of us to use

#

Why tf everything is so detailed

pulsar locust
celest thorn
celest thorn
#

but like everything sucks ass

#

tbh

#

because react is starting to get sometimes complicated especially with some stuff

restive turret
#

"we are 2 frameworks away from perfection"

pulsar locust
#

I use svelte and sveltekit

#

Typically split api with bare minimum ssr on sveltekit frontend

celest thorn
pulsar locust
#

Mostly because I sometimes have to use jsx on the api and having that be in the svelte frontend seems weird

celest thorn
#

here some crazy logic

restive turret
#

I'm so glad I'm not touching websites

celest thorn
#

which you see far away lol

upper vapor
celest thorn
upper vapor
upper vapor
#

WRONG ONE

#

Stupid discord

restive turret
#
void* free_custom(void* ptr)
{
free(ptr);
free(ptr); // we free double so we ensure it is free

return ptr;
}
restive turret
upper vapor
celest thorn
#

what you mean by that

restive turret
#

"strong-typed" when i see mf use any all place

celest thorn
#

that

#

i just place any tbh

upper vapor
restive turret
#

csxml

restive turret
#

war assembly

celest thorn
#

SO its fatser

#

:3

pulsar locust
celest thorn
#

omg i might switch

restive turret
#

just dont do websites

#

easy

celest thorn
#

CLI

#

Lets all do shit in CLI

celest thorn
#

no more website

#

Web assembly is way faster

upper vapor
celest thorn
#

tho its big

#

hmmm

#

Tho i need to consider

upper vapor
#

With Blazor SSR you can have server-rendered components and in those you can also have client-rendered components
Or make the entire app Wasm (will take a while to load, bad for SEO)

celest thorn
#

I can host website on netifly or vercel for free

#

With that i need to pay a vps

#

;(

#

Or even cloudflare pages

upper vapor
#

Cuz static assets

celest thorn
#

Apis

pulsar locust
#

Vercel can actually do C# on the server iirc
but it requires a shitty workaround

#

I know it can do php

upper vapor
celest thorn
upper vapor
celest thorn
harsh thorn
upper vapor
#

That's what I meant but I forg

#

Wait what

#

That's not

#

Huh

royal mica
unique crane
#

XD

covert flame
#

Since when?

restive turret
#

if you use newest csproj

#

you can do that

#

otherwise not

thin shuttle
restive turret
#

ye g et approval from beryl and everyone too

covert flame
#

What?

#

You mean vs26?

restive turret
#

Sdk style instead of msbuild style

covert flame
#

Ohhh

#

Yeah I do that

#

Cool

covert flame
restive turret
#

Yey

covert flame
#

Hell yeah

restive turret
#

Or idk actually

#

But assume yes

covert flame
#

Time to see

upper vapor
covert flame
#

Wow, I wish I knew that

#

Not the project reference one

#

Just the feature in general

#

I tried doing it and wondering why it wasnt working and then realised I was doing Publicized="true" instead of Publicize="true"

carmine prawn
covert flame
#

Nevermind, it still wont work lmao

#

I love life

upper vapor
#

build the project

restive turret
carmine prawn
#

who wants more lAbApi jokes?

upper vapor
#

labapu

restive turret
#

labapu

covert flame
restive turret
#

rebuikd

upper vapor
#

try again

restive turret
#

try harder

covert flame
#

Trust me, I've rebuilt as hard as possible

covert flame
#

I've never pressed Ctrl + B faster

upper vapor
#

try again

covert flame
#

Okay

upper vapor
#

full rebuild

covert flame
#

Yeah no

restive turret
#

send csproj

celest thorn
#

fast than light

restive turret
celest thorn
#

On god

#

i thank that someone at intelli thought to make it automatic

covert flame
#

I press CTRL + S after every character, god forbid I lose ANY progress

upper vapor
celest thorn
covert flame
#
<PackageReference Include="Northwood.LabAPI" Version="1.1.6.1" Publicize="true" />```
celest thorn
restive turret
covert flame
#

Is that not

#

Like, correct?

upper vapor
celest thorn
covert flame
upper vapor
#

did you add the bepinex package?

restive turret
#

bruh

upper vapor
#

drake laptop

celest thorn
#

bruh

covert flame
#

bruh

restive turret
#

<PackageReference Include="BepInEx.AssemblyPublicizer.MSBuild" Version="0.4.3" PrivateAssets="all" ExcludeAssets="runtime" ReferenceOutputAssembly="false" Private="true" />

upper vapor
#

you dont need allat

hearty shard
#

labubu

covert flame
#

Oh thank you for the spoon feeding

celest thorn
#

don't need all of that

upper vapor
#

check my SS

covert flame
#

Too much spoon feeding

restive turret
#

i have it all that

#

I hust copy paste it

covert flame
celest thorn
#

:3

restive turret
covert flame
#

Thoughts on polysharp guys?

celest thorn
upper vapor
#

server-specific screenshot shitting settings system

upper vapor
#

but

covert flame
#

Dont remember

upper vapor
#

usually you dont need everything

restive turret
#

im not in poly

#

so i dont need it

celest thorn
#

history is too embedded on my brain

covert flame
upper vapor
celest thorn
celest thorn
covert flame
#

Lowkey dont know why I have it

celest thorn
#

Bro i don't wanna get banned

#

like

upper vapor
celest thorn
#

i know its history

upper vapor
#

you dont use init-only getters

#

required members

celest thorn
#

||Schutzstaffel (or SS)||

upper vapor
#

germanese

celest thorn
#

Please do not ban me, im trying to educate

restive turret
#

istn like most of them already in newest C#?

upper vapor
#

some features require types that the framework provides

#

for example

restive turret
#

in newest .net you can do it without these

upper vapor
#

yes

restive turret
#

so?

upper vapor
#

but not in .net fw

covert flame
#

So polysharp is useless right, I dont even know what it is, nor do I know why I have it in EVERY project

celest thorn
#

like .net 2.0

restive turret
#

ah

#

so its for old version of .net

celest thorn
#

you have cool features

#

from modern on older

upper vapor
celest thorn
#

[CanBeNullable]

#

fuck jetsbrain always importing that

upper vapor
#

still no static abstract :((

upper vapor
restive turret
celest thorn
#

btw someone knows how template works i might create a template for my own plugins

upper vapor
#

you enabled nullable

celest thorn
#

I HATE doing like everytime the same shit

covert flame
#

Should we have nullable enabled, or like, who cares

restive turret
celest thorn
#

i have my own cool one

#

lol

restive turret
#

and also this

upper vapor
celest thorn
#

honestly i wanna run it on Rider

covert flame
#

I have 9 vs instances open, hmmm

upper vapor
upper vapor
celest thorn
#

im trying to see how to use it

covert flame
#

Well the thing is I didnt know you can enable nullable until I had built like a pretty large project and then I just kept off becuase I couldnt be bother going back through and changing everything

covert flame
upper vapor
covert flame
#

Yeah, besides, I already just assume everything can be null sooo

covert flame
upper vapor
covert flame
#

Ah

upper vapor
#

not enough arrows ik

covert flame
#

Sorry I'm a little slow, I need like big flashing lights, you know how it is

covert flame
#

Also imma just keep polysharp in everything, whatever, good to have I guess?

covert flame
#

There is no longer a problem

#

Wait a minute, why does it have the yellow triangle in the solution explorer

celest thorn
upper vapor
#

yea it replaces

celest thorn
covert flame
#

Aw well, it builds so like, whatever

upper vapor
#

colon british pound

covert flame
#

What if I just like, publicize everything, even though I dont have ot

#

Becuase like

#

Why not

#

Right?

#

No?

#

Okay

upper vapor
#

you will die

covert flame
#

Oh you're so right

celest thorn
#

i finally got a template so no 20 seconds spent for setting up a project everytime

#

toggle for style cop and done Trolley

covert flame
#

Do I need the include assets? <PackageReference Include="PolySharp" Version="1.15.0" PrivateAssets="all" IncludeAssets="runtime; build; native; contentfiles; analyzers; buildtransitive" />

#

Do I even need the private assets?

covert flame
#

Actually, instead of answering that can someone tell me what they are

covert flame
#

In some projects

celest thorn
#

4.8 has alot of stuff

covert flame
#

Anyways, what is PrivateAssets

celest thorn
# covert flame Anyways, what is `PrivateAssets`

You might be using a dependency purely as a development harness and might not want to expose that to projects that will consume your package. In this scenario, you can use the PrivateAssets metadata to control this behavior.

covert flame
#

Ahh

#

What is the default?

celest thorn
celest thorn
carmine prawn
steady gyro
#

where nwapi discord server?

carmine prawn
wary gust
#

but the discord exists ig. pretty sure last msg is like months old at this point

steady gyro
#

okthanks

upper vapor
carmine prawn
#

yep, it has been made read-only

pulsar locust
wary gust
carmine prawn
#

LabAPI is good

#

It seems out of sync?

somber dagger
# carmine prawn It seems out of sync?

Have you tried EXILED's implementation?
Regardless you may be able to add a short delay before checking if the user still has the item with the item serial in their inventory and I assume check if it exists in the world?? As a temporary workaround, that is

upper vapor
#

crazy

carmine prawn
upper vapor
cyan crown
restive turret
hearty shard
#

hi slime boy

upper vapor
restive turret
#

Ah yes, fix every visual bug first then fix gameplay bug after

upper vapor
#

yamato would be very happy

restive turret
#

I'm not doing visual bug fixes until it's on a real gameplay changing one

#

Maybe if they ask nicely (and possibly know where to look and how to fix)

hearty shard
#

also like i saw exiled has the same thing but they do validation on whether the source & destination is the same, idk if i wanna addthat

#

like do i want to tell people they messed up or do i just not care kek

upper vapor
#

you nuked reflection

#

um

hearty shard
hearty shard
#

did i actually end up taking that from exiled

#

i dont think so but its the same weird code choice lmao

#

@restive turret do you eat slime

#

clipped

tulip kiln
#

generated by sora

hearty shard
#

oh okay

#

if you say so

#

youd never lie

tulip kiln
#

So true sunglasses

upper vapor
tulip kiln
modern lark
#

trying rn to get room from DamagingWindow event

ev.Window.Room does not exist 😭

upper vapor
hearty shard
#

i dont remmeber the method name

upper vapor
#

RoomUtils

modern lark
hearty shard
#

AXXXXX

#

WAKE UPPPPPPP

upper vapor
#

i'm cooked

unique crane
hearty shard
#

and?

unique crane
#

Ummmmmmmmm

#

You

upper vapor
#

eveil

hearty shard
#

guh

#
[2026-04-09 19:45:44.452 +02:00] [ERROR] [LabApi] System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> HarmonyLib.HarmonyException: Patching exception in method static System.Reflection.MethodInfo SecretAPI.Patches.Features.RoundIgnoreCountPatch::TargetMethod() ---> System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> System.NullReferenceException: Object reference not set to an instance of an object
                                   at SecretAPI.Patches.Features.RoundIgnoreCountPatch.TargetMethod () [0x00015] in <523afa5ec0764a1abee0154756f31eae>:0

um

#

what

#

oh