Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Online game, coding problems.
#3
your last error 4/4
wut is going on with the flags?



/* if our flag is set, there is a problem */
if (!theCombat->opponentFlag[1]) {

theCombat->opponentFlag[0] = TRUE;
theCombat->opponentFlag[1] = FALSE;

Do_opponent_struct(c, &theCombat->opponent[1]);

if (c->player.energy <= 0) {

theCombat->message = IT_JUST_DIED;
Do_unlock_mutex(&theCombat->theLock);
kill(theCombat->opponent[0].processID ,SIGIO);
Do_lock_mutex(&c->realm->realm_lock);
c->game->it_combat = NULL;
Do_unlock_mutex(&c->realm->realm_lock);[/code]




Now I am not the most avid C++ coder which btw I must give you sum serious coodos for such a nice program.. But I dont beleive the BOLD sentences are legitimate arguments, even though your IDE may let you get away with this, I dont beleive that those two lines actually do something. maybe if you proceded with an "if" statement and capped the arguments in braces it "MIGHT" work. I was hesitant to awnser with a reply cause I didnt want to fail/seam like a dumbass offering null advice, but who knows maybe it might work? and at the very least a bump to the thread
slowly getting better
Reply


Messages In This Thread
Online game, coding problems. - by Link - 06-19-2011, 10:36 AM
RE: Online game, coding problems. - by haphazard - 09-14-2011, 08:07 PM
RE: Online game, coding problems. - by hacker - 09-14-2011, 08:34 PM
RE: Online game, coding problems. - by +Awesome - 09-18-2011, 01:45 AM

Possibly Related Threads…
Thread Author Replies Views Last Post
  Looking to learn some sort of coding... Alowishus 10 2,588 10-28-2009, 05:30 AM
Last Post: IllusionSlayer
  Whats your Favorite coding program??? HuNt3R 28 5,190 10-19-2009, 06:55 PM
Last Post: HatredTrinity

Forum Jump:


Users browsing this thread: 1 Guest(s)