veylon, that isnt a very nice way fo using the interface, I myself would never do that.
Code: Select all
char c[200];
const string myString = callback->GetUnitDef("CORSOLAR").name;
sprintf(c, "I have a %s", myString.c_str());
should be
Code: Select all
string mystring = "I have a";
const UnitDef* ud = callback->GetUnitDef("CORSOLAR");
mystring += ud->name.c_str();
That above should work for you. Why your string variable is 'const' or why you used '.name' when it returns a pointer not a reference, so even then ti should be ->name, aswell as the fact that the outcome of the above if ti did work would be "I have a CORSOLAR", you need to use ud->humanname instead.
Also if you cant use a string normally then that suggests you cant use a string using your wrapper class, which you have done. I think I remember you said you where using VS .JNet 2003? I'm not sure, but it always works of me. Try not to use the likes of GetUnitDef()-> etc... as you might need to change ti later on if you want extra data to be taken and you dont wanan deal with multiple calls.
Look at how strings are used in JCAI, TAI and SJ's groupAI's, they all work, even though JCAI is not 100% stable, TAI is stable though nowhere near as complete, and SJ's are all GroupAI's..
As for CVS, using tortoise CVS I just right click on the spring cvs folder I downloaded and click on update, and it does it all for me as long as I've set it up right.