Uh, I had a look at your current work…,sorry to say, but I think you have some fundamental errors in your coding style. Some operations aren’t possible (allowed) in C, e.g.:
if (x) {
do something
}else{
do something else
}else{
do something else
}
isn’t possible. You already have an ‘else’!
see: https://github.com/coltongit/3wctf/blob/master/code/game/g_team.c#L1652
Also, have a look at: https://github.com/coltongit/3wctf/blob/master/code/game/g_team.c#L186
This is wrong!
eventParm = ( team == TEAM_RED ) ? GTS_REDTEAM_TOOK_LEAD : GTS_BLUETEAM_TOOK_LEAD
Reads as "eventParm = if team is red than GTS_REDTEAM_TOOK_LEAD else GTS_BLUETEAM_TOOK_LEAD
In other words: = ? something : _something_ reads as if/else
So eventParm = ( team == TEAM_RED ) ? GTS_REDTEAM_TOOK_LEAD : GTS_BLUETEAM_TOOK_LEAD : GTS_GREENTEAM_TOOK_LEAD;
doesn’t work.
You can’t simply copy/paste some code here and there. Simply expand every line with ‘green’ where ‘red/blue’ already is doesn’t work!
You don’t need to deal with ai_cmd for now, it will never work, because you have no ‘green’ goal yet (LTG_GETFLAG)…
Hmm, I don’t want to discourage you but I think you should learn some fundamentals about C programming first!
e.g.: http://www.cprogramming.com/tutorial/c/lesson1.html
or: http://www.tutorialspoint.com/ansi_c/c_introduction.htm