Hey guys. I'm making an RDM menu, and I recently migrated my console commands over from being on the client to being on the server. Basically all this means is that my code went from:
client:
[CODE]
concommand.Add( "rdm_menu", function()
net.Start( "rdm_menu" )
net.SendToServer()
end )
[/CODE]
to this, on this server:
[CODE]
concommand.Add( "rdm_menu", open_menu )
[/CODE]
HOWEVER: I get this baffling error. Whenever I try to run the (now server sided) console command, it prints this: Unknown Command: 'rdm_menu'
The confusing thing is that it prints this to chat and the console, not just the console like when a 'normal' command is not found. When I type into console 'sjkhdaskjhd12376y1', it gives me: unkown command: 'sjkhdaskjhd12376y1', but only in console. When I try to use my specific console command, it gives me the error in chat also. I am unable to replicate the differences that make it print the error in chat, but I believe that this has to do with the fact that the console command WAS on the client, but is now on the server. If I remove the code for my console command on the server, it stops giving me the error in chat that the console command is undefined, and only puts the error in the console. So to some degree it must recognize that I've registered the command on the server, as it gives me different error messages based on whether or not the code is active on the server.
Do note that I have multiple console commands in the same file, not just the rdm_menu command. All of those commands work perfectly without error, as they were not previously on the client. I am also able to add new console commands to the server and run them from the client perfectly fine, as long as they are not named 'rdm_menu'.
I have found a 'fix'.
1. load into the game with the console command registered.
2. comment out the console command code, then save.
3. un-comment the code, and save again. The console command will now work.
This works consistently, but obviously is not realistic.
Things I have tried:
1.Uninstalling my code, restarting game. Did not work.
2.Uninstalling my entire game, deleting all traces from my hard drive, then re-installing. Did not work.
3.Weeping openly, cursing the gods and their hatred for me. Will report back in a few hours.
Sorry, you need to Log In to post a reply to this thread.