What do your logs show for the error?
It will print out the control text that it received. The one that didn't work for whatever reason.
I'm starting to suspect that your CodeBlocks is beginning to act up on you. It does that sometimes when a single command gets too long and complicated. The entire function in gmcmds.cpp is, in fact, ONE command. It's all a single logical statement filled with if/else if conditionals.
It can get too long for the compiler to be able to handle it but CB will not throw a visible error. It will just compile it wrong and then give you a bunch of unexpected results.
You could try replacing all the if statements with self contained ifs
- if (strcmp(command, "reborn")==0) //==== Reborn ==== (By Core)
- {
- if(Config.Command_Reborn > thisclient->Session->accesslevel)
- return true;
-
- return pakGMReborn(thisclient);
- }
rather than
- else if (strcmp(command, "reborn")==0) //==== Reborn ==== (By Core)
- {
- if(Config.Command_Reborn > thisclient->Session->accesslevel)
- return true;
-
- return pakGMReborn(thisclient);
- }
to get rid of all the ELSEs
I had to do that when converting the code to compile in Visual Studio because VS is smart enough to throw an error at compile time when a conditional statement gets too complex
Another issue that i bumped into with CodeBlocks was a very similar one involving the loading of commands.ini
I found that adding new commands to the config structure and loading them in from the ini file just stopped working at a certain point and once again just gave no compile error whatsoever.
It just left a bunch of Config values such as Config.Command_Reborn (just as an example) with uninitialized values which in CB actually translates as NULL most of the time.
If the problem was the config value then the error would not be what you see though. You appear to be seeing an unrecognized command name which gives you an error message in logs and a PM to the player
If the problem were an uninitialized config value then the function would return true and you would never get that error.
So while it is very likely that codeblocks is dicking around with your code and not compiling it correctly in more than one place, the error that you are seeing can most likely be fixed by getting rid of all the ELSE keywords in gmcmds.cpp
You could also completely ditch the unadulterated crap that is CodeBlocks and start using Visual Studio but that might take a little more work