.qc (dot qc) - the group for quake c coders of all denominations. If you make quake one mods and write code in quake c, join our group! I'll try to answer any quake c questions - please post your inquiry in the forums...

Forum Thread
  Posts  
Compile error - unknown value (Groups : qc : Forum : hard_code() : Compile error - unknown value) Locked
Thread Options
numbersix
numbersix quake-c coder++
Feb 20 2017 Anchor

This happened:

unknown value error

I was testing various modules. X monsters are not on the compile list now as I have yet to
add random monsters back in.

Code fragment:

framerloop($heximpwat1, $heximpwat24, heximp_sit1, 0.1,

	frame_arb($heximpwat1,if (random() < 0.5) sound (self, CHAN_VOICE, "heximp/up.wav", 1, ATTN_IDLE));
	ai_stand();
);

This is a considerable concern. "framerloop" is one of my new macros to replace
a series of the old quake frame macros. Each one uses a global var and there is no
reason to when this macro can replace them and use one global.

But - how did this fail compile?

I have 65 of these that compile every time with no problem. And I just compiled this a few minutes back with no issue.

I played with this a bit. I could find no reason heximp_sit1 is unknown.
Hair pulling was becoming a valid option when I noticed the first error on line 1:

f/* ::-::

As often happens when using 3 or 4 different interface (scite, geany, vi, bash term line, web stuff like this)
I get odd stray chars as I constantly switch around. I'm constantly removing ` from source as I use
guake term and ALT-` is how I call it and banish it. If ALT isnt hit solid, ` gets injected in the current interface.

So, the case seems that a stray char before a macro can cause bizarre results.

Sometimes it pays to fix errors in order of appearance rather than focusing on the most important.

When I removed the stray "f", the module compiled fine.

Reply to thread
click to sign in and post

Only registered members can share their thoughts. So come on! Join the community today (totally free - or sign in with your social account on the right) and join in the conversation.