Problem running script
Posted: 11.06.2004, 18:48
Im trying to edit the program so that when a key is pressed it runs a script. Here is what I have so far. I think I have only changed the celestiacore.cpp file.
when I try to compile I Get the following error
Any thought would be appreciated.
-Lex
Code: Select all
void CelestiaCore::charEntered(char c)
{
Observer* observer = sim->getActiveObserver();
if (c == 'e' || c == 'E')
{
std::string scriptfile="c:\\celestia\\demo.cel";
CommandParser parser(scriptfile);
CommandSequence* script = parser.parse();
CelestiaCore::cancelScript(); // cancel any running script
CelestiaCore::runScript(script);
}
when I try to compile I Get the following error
Code: Select all
cd ..
cd celestia
nmake /NOLOGO celestia.mak CFG=Release
rc /l 0x409 /d "NDEBUG" /fo .\Release\celestia.res /i "res" .\res\celest
ia.rc
cl.exe @C:\DOCUME~1\Lex\LOCALS~1\Temp\nma02472.
celestiacore.cpp
celestiacore.cpp(1055) : error C2664: '__thiscall CommandParser::CommandParser(c
lass std::basic_istream<char,struct std::char_traits<char> > &)' : cannot conver
t parameter 1 from 'class std::basic_string<char,struct std::char_traits<char>,c
lass std::allocator<char> >' to 'class std::basic_istream<char,struct std::char_
traits<char> > &'
A reference that is not to 'const' cannot be bound to a non-lvalue
configfile.cpp
eclipsefinder.cpp
favorites.cpp
ODMenu.cpp
url.cpp
wineclipses.cpp
wingotodlg.cpp
winbookmarks.cpp
winhyperlinks.cpp
winlocations.cpp
winssbrowser.cpp
winstarbrowser.cpp
winviewoptsdlg.cpp
NMAKE : fatal error U1077: 'cl.exe' : return code '0x2'
Stop.
NMAKE : fatal error U1077: 'C:\PROGRA~1\MICROS~2\VC98\BIN\NMAKE.EXE' : return co
de '0x2'
Stop.
Any thought would be appreciated.
-Lex