[Pogamut-list] Falling

jakub.gemrot pogamut-forum at artemis.ms.mff.cuni.cz
Fri Nov 21 09:08:59 CET 2008


Re: Falling

Author: jakub.gemrot

If there is a KillerID then the GameBots must have sent some id there otherwise it would be null. However there is a possibility that GameBots sent "None" as id which is subscribed in parser as ID token 348.

This is a JFlex piece of code that parses the DIE message

 {
  "{Killer " {IDENT} "}"   {((BotKilled)actObj).killerID   = unrealID2intID(getIdent(yytext(),1));}
  "{DamageType " {TEXT} "}" {((BotKilled)actObj).damageType = getText(yytext(),1);}    /* FIXME: je to opravdu text? */
}

"""
unrealID2intID(getIdent(yytext(),1))
"""
means the string id is translated to int id (that 348) unrotunately it doesn't save the original ID so you can investigate it. However if you are able to fully debug your bot (like running it as a separate java project) you can put a breakpoint to Parser.java at the line of that msg_die and see what you get inside yytext()

Cheers! Jakub





More information about the Pogamut-list mailing list