problem with CSQC and commands

Discuss programming in the QuakeC language.
Post Reply
Nahuel
Posts: 495
Joined: Wed Jan 12, 2011 8:42 pm
Location: mar del plata

problem with CSQC and commands

Post by Nahuel »

Hello to everyone. I have a problem, is that every time i run my own console command CSQC shows me this message ( i am using Darkplaces)

Code: Select all

Command "xxxxx" can not be Executed
The command is executed anyway. But the message is very annoying.
For example, in CSQC_unit, i have

Code: Select all

registercommand("xxxxx");
and in CSQC_ConsoleCommand i have for example

Code: Select all

if (argv(0) == "xxxxx") 
		somefunction();
So, I was concerned that the command is executed. But is there any way that does not appear that particularly annoying message?
Thank you all in advance!
Last edited by Nahuel on Mon Nov 21, 2011 5:47 pm, edited 1 time in total.
hi, I am nahuel, I love quake and qc.
WickedShell
Posts: 24
Joined: Mon Feb 14, 2011 5:16 am

Re: problem with CSQC and commands

Post by WickedShell »

Not to be obtuse, but in the last segment you posted you have one more x then in the above. (I'm not sure if you just typed up a fake example, or copy pasted output). Could be a dumb point on my part (and if so I can't help further because I haven't explored that area yet)
Nahuel
Posts: 495
Joined: Wed Jan 12, 2011 8:42 pm
Location: mar del plata

Re: problem with CSQC and commands

Post by Nahuel »

WickedShell wrote:Not to be obtuse, but in the last segment you posted you have one more x then in the above. (I'm not sure if you just typed up a fake example, or copy pasted output). Could be a dumb point on my part (and if so I can't help further because I haven't explored that area yet)
it´s a simple fake example!! :D
hi, I am nahuel, I love quake and qc.
Spike
Posts: 2914
Joined: Fri Nov 05, 2004 3:12 am
Location: UK
Contact:

Re: problem with CSQC and commands

Post by Spike »

If you handle it, you must return true. You may only return false if you do not recognise the command.
If you don't return anything, false is returned anyway.
Nahuel
Posts: 495
Joined: Wed Jan 12, 2011 8:42 pm
Location: mar del plata

Re: problem with CSQC and commands

Post by Nahuel »

Spike wrote:If you handle it, you must return true. You may only return false if you do not recognise the command.
If you don't return anything, false is returned anyway.
thank you :D :D it work´s very fine!!
hi, I am nahuel, I love quake and qc.
Post Reply