I've it a minor hiccough in my scenario parser.
I'm trying to read a character string from the scn file and then pass it to "oapiGetVesselByName ()". I the name writes to the scn file just fine but I'm having trouble reading it.
here is the pertinent portion of "clbkLoadStateEx"
I've used this same basic format in other areas without problem so I'm not sure why it isn't working here. Any idea what I'm doing wrong?
I'm trying to read a character string from the scn file and then pass it to "oapiGetVesselByName ()". I the name writes to the scn file just fine but I'm having trouble reading it.
here is the pertinent portion of "clbkLoadStateEx"
Code:
// Find mothership if able
if (!_strnicmp (cbuf, "MOM", 4))
{
char name[256];
[COLOR="Red"]sprintf (name, "%s", cbuf+4);[/COLOR]
OBJHANDLE oh = oapiGetVesselByName (name);
if (oh != NULL) oh_mother = oh;
}
I've used this same basic format in other areas without problem so I'm not sure why it isn't working here. Any idea what I'm doing wrong?