Home » MODDING HQ 1.13 » v1.13 Coding Talk » Learning how the tactical AI works
Re: Learning how the AI works[message #274489] Fri, 25 February 2011 00:07 Go to previous messageGo to previous message
tais

 
Messages:656
Registered:February 2008
Location: NL
MorgluM
Almost there! Just the one error left and it should be an easy one.
This codes:

--

#ifdef DEBUGDECISIONS
STR tempstr;
sprintf(tempstr, "%d CONTINUES MOVEMENT to gridno %d... ", pSoldier->ubID,sGridNo );
DebugAI( tempstr );
#endif

Gives me the following error (line 149 is the sprintf line)

>c:\svn_ja2\build\tacticalai\movement.cpp(149): warning C4700: uninitialized local variable 'tempstr' used

I just initialized the damn variable!
any idea?


Well as far as I can see you're only declaring the variable, not initializing it..
On the other hand it should work this way.. how about you change it in STR tempstr = ""; ?

[Updated on: Fri, 25 February 2011 00:07] by Moderator

Report message to a moderator

First Sergeant

 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Doubling image size
Next Topic: RII - Resolution Independent Interface [UPDATE :RII v4f]
Goto Forum:
  


Current Time: Tue Feb 11 12:32:46 GMT+2 2025

Total time taken to generate the page: 0.01095 seconds