Howto:Add new fgcommands to FlightGear: Difference between revisions

Jump to navigation Jump to search
m
Line 177: Line 177:
do_hello_world (const SGPropertyNode * arg)
do_hello_world (const SGPropertyNode * arg)
{
{
    
   string name = "anonymous"; // default
  name = arg->getStringValue("name");
   try {
   try {
     SG_LOG(SG_GENERAL, SG_ALERT, "Hello World");
     SG_LOG(SG_GENERAL, SG_ALERT, "Hello World:"<<name.c_str() );
   } catch (const sg_exception &e) {
   } catch (const sg_exception &e) {
     guiErrorMessage("Error saying HELLO WORLD: ", e);
     guiErrorMessage("Error saying HELLO WORLD: ", e);

Navigation menu