QuestionHelpC++ convar crash

Posts 1–15 of 16 · Page 1 of 2
C++ convar crash
Okay i will try and ask here and see if i for once can get a bit of help without all the "not-so-nice-people" hating..

I have a little problem.. When i create a cvar:
Code:
ConVar cvar = ConVar("cvartest", "test");
g_ICvar->RegisterConCommand(&cvar);
It works just fine.. But when i try to change the cvar or start a game it crash..
The only way to stop it from crashing is adding the FCVAR_NEVER_AS_STRING flag.. But that is not really a "solution"
Anyone know what the problem is and how to "fix" it?

EDIT:
This dude had the same problem:
http://www.mpgh.net/forum/782-garrys...gs-convar.html
using ConVar() without new will make it not allocated, so when the function ends, the memory will be different. you need to allocated memory for your convar so it doesn't disappear then crash.
Quote Originally Posted by MeepDarknessMeep View Post
using ConVar() without new will make it not allocated, so when the function ends, the memory will be different. you need to allocated memory for your convar so it doesn't disappear then crash.
That is not true and even with new the problem is there..
But thanks anyway
have you debugged it yet? i don't mess with convars anymore and when i did, i was a complete noob to c++. do you know what instructions it crashes at?
Quote Originally Posted by MeepDarknessMeep View Post
have you debugged it yet? i don't mess with convars anymore and when i did, i was a complete noob to c++. do you know what instructions it crashes at?
Nope.. Can for some reason not get ollydbg to work with gmod :s
don't use convars, any new anticheat that will start using hex's convar module will detect it
Quote Originally Posted by D3M0L1T10N View Post
don't use convars, any new anticheat that will start using hex's convar module will detect it
HAC will only work on sandbox sooo...
And i am spoofing cvars but i need to make a new fake sv_cheats to stop the game from spamming my singleplayer :b And to stop anticheats from spamming errors
Quote Originally Posted by kasperbjerby View Post
HAC will only work on sandbox sooo...
And i am spoofing cvars but i need to make a new fake sv_cheats to stop the game from spamming my singleplayer :b And to stop anticheats from spamming errors
HAC can detect spoofed convars, and any other convars for that matter. See the sv_CVL plugin.
If youre asking how to make a convar to hold a string i honestly dont know. I also crash when trying to hold a string in a convar, Right now im only able to use ints.
Quote Originally Posted by ehex View Post
If youre asking how to make a convar to hold a string i honestly dont know. I also crash when trying to hold a string in a convar, Right now im only able to use ints.
It's just wierd that a thing as the source engine...
I mean.. It should work?
Quote Originally Posted by kasperbjerby View Post
It's just wierd that a thing as the source engine...
I mean.. It should work?
Or maybe that problem is specific to Garry's Mod 13 and that you should stop pasting and selling copy and pasted hacks.
Quote Originally Posted by _Fami View Post
Or maybe that problem is specific to Garry's Mod 13 and that you should stop pasting and selling copy and pasted hacks.
Suck my black cock motherfucker ;p
But problem solved.. I found a workaround
Quote Originally Posted by kasperbjerby View Post
Suck my black cock motherfucker ;p
But problem solved.. I found a workaround
SO YOU ARE BLACK ARE YOU?
there is a way to bypass HAC's convar checking without bypassing some of the internal features. Stop acting so high and mighty, Hex.
Posts 1–15 of 16 · Page 1 of 2

Post a Reply

Similar Threads

Tags for this Thread

None

Talk with us