#"The value of parameter 'Lib' cannot be used as a constant"

27 messages · Page 1 of 1 (latest)

drowsy grove
#

Now the problem is that for some reason std::thread(AttachDLL<Lib>).detach(); is incorrect and I'm not sure why or how

honest tulipBOT
#

@drowsy grove has reached level 1. GG!

drowsy grove
#

the original code was this mess

#
DWORD WINAPI LoadLibraries(int Lib) {
    StartThread Threads[] = { AttachDLL0, AttachDLL1, AttachDLL2, AttachDLL3, AttachDLL4, AttachDLL5, AttachDLL6, AttachDLL7, AttachDLL8, AttachDLL9, AttachDLL10};
    int Timers[] = { Timer0, Timer1, Timer2, Timer3, Timer4, Timer5, Timer6, Timer7, Timer8, Timer9, Timer10 };

    if (!(Lib >= 0 && Lib <= 10)) {
        return 1;
    }

    HANDLE hThread = CreateThread(nullptr, 0, (LPTHREAD_START_ROUTINE)Threads[Lib], nullptr, 0, 0);
    if (hThread != nullptr)
        CloseHandle(hThread);
    DebugLog("LoadLibraries", "Creating new thread for DLL" + std::to_string(Lib) + " | Timer: " + std::to_string(Timers[Lib]) + "s");

    return 0;
}

This was the equivalent of void Threads(int Lib) btw

#

And yes I did change both of them to constants but it still said I was wrong

drowsy grove
#

Well I think I found the problem

#

Now I just need to find out how to workaround it and get it to work how I want it to

#

It wants a constant int, which is annoying since the whole point is to NOT do that

summer cargo
#

@drowsy grove this is against the of the server we won't help

drowsy grove
summer cargo
#

DLL injector for games

drowsy grove
#

This isn't hacks or anything related, this is specifically for modding and reviving

summer cargo
#

Doesn't really matter

drowsy grove
#

This isn't even an injector

#

This is literally just adding the library via a DLL already allowed

summer cargo
#

@drowsy grove feel free to contact an admin if you have any issue with a moderator actions

drowsy grove
#

I'm talking to you right now

honest tulipBOT
#

@drowsy grove has reached level 2. GG!

drowsy grove
#

You can claim #8 instantly

#

but I beg to differ

summer cargo
drowsy grove
#

Can you ping one here then