Forum

problem with CSQC and commands

Discuss programming in the QuakeC language.

Moderator: InsideQC Admins

problem with CSQC and commands

Postby Nahuel » Mon Nov 21, 2011 5:26 pm

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.
User avatar
Nahuel
 
Posts: 492
Joined: Wed Jan 12, 2011 8:42 pm
Location: mar del plata

Re: problem with CSQC and commands

Postby WickedShell » Mon Nov 21, 2011 5:35 pm

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)
WickedShell
 
Posts: 24
Joined: Mon Feb 14, 2011 5:16 am

Re: problem with CSQC and commands

Postby Nahuel » Mon Nov 21, 2011 5:47 pm

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.
User avatar
Nahuel
 
Posts: 492
Joined: Wed Jan 12, 2011 8:42 pm
Location: mar del plata

Re: problem with CSQC and commands

Postby Spike » Mon Nov 21, 2011 6:02 pm

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.
Spike
 
Posts: 2892
Joined: Fri Nov 05, 2004 3:12 am
Location: UK

Re: problem with CSQC and commands

Postby Nahuel » Mon Nov 21, 2011 6:28 pm

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.
User avatar
Nahuel
 
Posts: 492
Joined: Wed Jan 12, 2011 8:42 pm
Location: mar del plata


Return to QuakeC Programming

Who is online

Users browsing this forum: No registered users and 1 guest