|
Post by thehappyfriar on Nov 13, 2013 10:22:53 GMT -5
If I make any changes to the spawn_t spawns[] section in g_spawn.c, I always get these compile errors. I'm using MSVC++ 2010 Express:
1>------ Build started: Project: lazarus, Configuration: Debug Win32 ------ 1> g_spawn.c 1>g_spawn.c(316): error C2099: initializer is not a constant 1>g_spawn.c(317): error C2078: too many initializers 1>g_spawn.c(895): fatal error C1903: unable to recover from previous error(s); stopping compilation ========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========
I've tried making my own spawn's, I've copied/paste current ones and move them to another location (even one line below), I've tried manually typing them in, manually retyping ones that existed, doesn't matter.
In this case, I copied/paste the line ("misc_insane", SP_misc_insane); to the line right after it, deleted the original, and get this error. If I put the original back (CTRL+Z) then it compiled. If I leave two of the same line in there and comment out the original, it won't compile. If I comment out the copied/pasted one, it does compile.
I've successfully compiled and modified the stock Q2 source + sdk before and Doom 3 source + sdk, this is the first time I've had something like this.
|
|
|
Post by knightmare on Nov 14, 2013 16:18:54 GMT -5
I've never compiled it with VS2010, only 2008. But it looks like you may have a syntax error in the snippet you pasted: the lines in the spawn table end with commas, not semicolons, which would cause an error:
{"misc_insane", SP_misc_insane},
{"misc_insane", SP_misc_insane};
The latter results in an error in VS2008:
1>g_spawn.c 1>..\..\game\g_spawn.c(313) : error C2059: syntax error : ';' 1>..\..\game\g_spawn.c(314) : error C2449: found '{' at file scope (missing function header?) 1>..\..\game\g_spawn.c(314) : error C2059: syntax error : '}' 1>..\..\game\g_spawn.c(315) : error C2059: syntax error : ','
|
|
|
Post by thehappyfriar on Nov 14, 2013 22:22:10 GMT -5
That's a typo on my end, sorry. I couldn't find a copy of Express 2008 so I used my 2010 I have installed.
Strange though, can't make sense of it. IE I typed in a new entry in to the spawn table, got the error I posted earlier. I copied/pasted another spawn table entry, modified to what I wanted, no error. :? I can type the entry exactly, comment out the previous one that I copied/pasted and modified, and it gives me the error. Very strange.
|
|