How to work with CSQC?
Moderator: InsideQC Admins
10 posts
• Page 1 of 1
How to work with CSQC?
Hi !
I use the Frikqcc QC compiler for my DP modding, and I recently read that that DP supports the QSQC extensions, which I think is cool coz I would like add my own custom HUD and other things like that.
The question I have is that of how I would compile the QC code which has QSQC specific code in it? Will Firkqcc give me problems with this or will i need a new compiler, or do I just includes the QC stuf with the progdefs.h?
Thanx!
I use the Frikqcc QC compiler for my DP modding, and I recently read that that DP supports the QSQC extensions, which I think is cool coz I would like add my own custom HUD and other things like that.
The question I have is that of how I would compile the QC code which has QSQC specific code in it? Will Firkqcc give me problems with this or will i need a new compiler, or do I just includes the QC stuf with the progdefs.h?
Thanx!
....noodle...
- Zylyx_
- Posts: 111
- Joined: Wed Dec 05, 2007 6:52 pm
- Location: scotland, uk
Urre has created two excellent CSQC intro tutorials:
http://qexpo.tastyspleen.net/booth.php?id=165&page=308
http://qexpo.tastyspleen.net/booth.php?id=165&page=317
http://qexpo.tastyspleen.net/booth.php?id=165&page=308
http://qexpo.tastyspleen.net/booth.php?id=165&page=317
Apathy Now!
-

MauveBib - Posts: 634
- Joined: Thu Nov 04, 2004 1:22 am
Oh, I just have a few more issues now.
The biggest issue is that I cant compile my csprogs.dat using FTEEQCC after I add dpextensions.qc after the the cs_builtins.qc in the progs.src in my csqc directory. FTEQCC returns these errors:
I'm using the dpextensions.qc file from the 20090222beta1 version of DP.
Also, in my moddir/src folder I have two sub folders, csqc and ssqc. Now in both of them I have the FTEEQCC compiler, so that the ssqc compiles the progs.dat and the csqc compiles the csprogs.dat. Now, I would like to know if my mod requires both of those, or just the csprogs.dat, and if the csprogs gets overwritten with the progs.dat when loading in DP.
thnx again
[/code]
The biggest issue is that I cant compile my csprogs.dat using FTEEQCC after I add dpextensions.qc after the the cs_builtins.qc in the progs.src in my csqc directory. FTEQCC returns these errors:
- Code: Select all
Source file: progs.src
outputfile: ../csprogs.dat
compiling Defs.qc
compiling csqc_constants.qc
compiling csqc_builtins.qc
compiling dpextensions.qc
dpextensions.qc:16: error: checkextension redeclared, prev instance is in csqc_builtins.qc
csqc_builtins.qc:62: checkextension is defined here
dpextensions.qc:96: error: EF_ADDITIVE redeclared
csqc_constants.qc:98: EF_ADDITIVE is defined here
dpextensions.qc:104: error: EF_BLUE redeclared
csqc_constants.qc:99: EF_BLUE is defined here
dpextensions.qc:120: error: EF_FLAME redeclared
csqc_constants.qc:102: EF_FLAME is defined here
dpextensions.qc:128: error: EF_FULLBRIGHT redeclared
csqc_constants.qc:101: EF_FULLBRIGHT is defined here
dpextensions.qc:136: error: EF_NODEPTHTEST redeclared
csqc_constants.qc:105: EF_NODEPTHTEST is defined here
dpextensions.qc:144: error: EF_NODRAW redeclared
csqc_constants.qc:97: EF_NODRAW is defined here
dpextensions.qc:166: error: EF_NOSHADOW redeclared
csqc_constants.qc:104: EF_NOSHADOW is defined here
dpextensions.qc:174: error: EF_RED redeclared
csqc_constants.qc:100: EF_RED is defined here
dpextensions.qc:182: error: EF_STARDUST redeclared
csqc_constants.qc:103: EF_STARDUST is defined here
dpextensions.qc:565: error: cvar_string redeclared, prev instance is in csqc_builtins.qc
csqc_builtins.qc:220: cvar_string is defined here
I'm using the dpextensions.qc file from the 20090222beta1 version of DP.
Also, in my moddir/src folder I have two sub folders, csqc and ssqc. Now in both of them I have the FTEEQCC compiler, so that the ssqc compiles the progs.dat and the csqc compiles the csprogs.dat. Now, I would like to know if my mod requires both of those, or just the csprogs.dat, and if the csprogs gets overwritten with the progs.dat when loading in DP.
thnx again
[/code]
....noodle...
- Zylyx_
- Posts: 111
- Joined: Wed Dec 05, 2007 6:52 pm
- Location: scotland, uk
I was just trying to complete this tutorial too. The error your getting is because you are declaring the same thing twice for some reason (maybe dpextensions.qc looked different when this tutorial was written).
I'm pretty new to this myself but what I did was comment out all of the lines that were redundant in csqc_builtins.qc and sqc_constants.qc. You could comment them out of your dpextensions file but then you would have to keep doing that over and over every update of DarkPlaces.
It took forever but once it was all said and done I still got an error
My guess is the tutorial is out of date and enttype doesn't work anymore or something.
Edit: If you declare .float enttype; in defs.qc it fixes the error I mentioned. works fine now.
I'm pretty new to this myself but what I did was comment out all of the lines that were redundant in csqc_builtins.qc and sqc_constants.qc. You could comment them out of your dpextensions file but then you would have to keep doing that over and over every update of DarkPlaces.
It took forever but once it was all said and done I still got an error
- Code: Select all
compiling Main.qc
in function CSQC_Ent_Update (line 56)
Main.qc:57: error: Unknown value "enttype".
Main.qc:57: error: "." - not a name
My guess is the tutorial is out of date and enttype doesn't work anymore or something.
Edit: If you declare .float enttype; in defs.qc it fixes the error I mentioned. works fine now.
- Boss429
- Posts: 39
- Joined: Sun Dec 03, 2006 7:29 pm
Well, I dont think we even need the scratch base csqc code to code cs. My theory is that as long you have dpextensions included in both the csqc and the ssqc code bases then it should work fine.
The only question that is still unanswered for me is why is ssqc even needed? I mean, I could just code verything in csqc and have no problems, right?
The only question that is still unanswered for me is why is ssqc even needed? I mean, I could just code verything in csqc and have no problems, right?
....noodle...
- Zylyx_
- Posts: 111
- Joined: Wed Dec 05, 2007 6:52 pm
- Location: scotland, uk
While you can code a mod entirely in csqc, you loose any multiplayer compatibility. csprogs.dat is _not_ a replacement for progs.dat, it is an addition. Having said that, it does allow you to reduce your progs.dat to simple resending of events.
Regarding dpextensions.qc - your csqc_builtins.qc file has elements inside it which are not actually part of the base csqc.
cvar_string is also not explicitly defined to be part of csqc either, but checkextension is defined as an extension which must be present in csqc.
Additionally not all of dpextensions.qc makes sense (eg: botclient).
Easiest is to just comment out stuff from csqc_builtins/csqc_constants.
csqc itself does not require fteqcc to compile/use. However, your base code may utilise some of its features, most commonly its arrays.
Both fteqcc and frikqcc support #ifdef stuff, so both are plausible compilers for csqc.
Regarding dpextensions.qc - your csqc_builtins.qc file has elements inside it which are not actually part of the base csqc.
cvar_string is also not explicitly defined to be part of csqc either, but checkextension is defined as an extension which must be present in csqc.
Additionally not all of dpextensions.qc makes sense (eg: botclient).
Easiest is to just comment out stuff from csqc_builtins/csqc_constants.
csqc itself does not require fteqcc to compile/use. However, your base code may utilise some of its features, most commonly its arrays.
Both fteqcc and frikqcc support #ifdef stuff, so both are plausible compilers for csqc.
- Spike
- Posts: 2892
- Joined: Fri Nov 05, 2004 3:12 am
- Location: UK
10 posts
• Page 1 of 1
Who is online
Users browsing this forum: No registered users and 1 guest
