Using CON_Ready() in the source code?

Status
Not open for further replies.
As some of you may know, I've been working on customizable menu controls. I've now been trying to optimize it and such with what I've learned (as well as make it compatible with the current source code), but just like last time, I still can not get CON_Ready() to work, however since that function exists for the sake of checking if the console is open, I'd like to not just make the actual variable for the console globally available like I did last time.

Case in question: m_menu.c, where I'm trying to use CON_Ready() in an "if" check to see if the console is open.

When compiling, no executable is made, and I'm left with a "path\src/m_menu.c:2208: undefined reference to 'CON_READY' ".
Note that m_menu.c has "#include console.h", which has "boolean CON_Ready(void)" declared, and f_finale.c has "#include console.h" and uses CON_Ready() without any issues.
(CON_Ready's function itself is set up in console.c, which neither m_menu.c nor f_finale.c include.)

So in short... How do I use CON_Ready() correctly in the source code?

Edit: Also, code in question from m_menu.c:
Code:
-Snip-
}
[I]// Open the pause menu, unless the chat is open or the key is used by the console, customizable[/I]
else if ((ch == gamecontrolmenu[mc_openmenu][0] || ch == gamecontrolmenu[mc_openmenu][1]) && (!([B]CON_READY()[/B]) || ch >= NUMKEYS) && !chat_on)
{
-Snip-
 
Last edited:
...Okay, I was about to go on about that "I know" and such, and that the case is correct, and I checked to make sure it was "CON_Ready" in other files... Then I realized I wrote it all in upper-case in m_menu.c by accident. Wow.
Thank you very much, this has been bugging me all day. To think I tried out so many things, but the one thing I didn't do was checking if I wrote it with the right case... Again, thank you. It works perfectly fine now.
 
Status
Not open for further replies.

Who is viewing this thread (Total: 1, Members: 0, Guests: 1)

Back
Top