I didnt change anything in unit_updater
this exception changes every time i run the script
*ERROR* [2015-02-10 00:48:11] In [..\..\source\glest_game\world\unit_updater.cpp::Glest::Game::UnitUpdater::updateHarvest 1804] UNKNOWN error
*ERROR* [2015-02-10 00:48:12] In [..\..\source\glest_game\world\unit_updater.cpp::Glest::Game::UnitUpdater::updateUnitCommand Line: 439] Error [In [..\..\source\glest_game\world\unit_updater.cpp::Glest::Game::UnitUpdater::updateHarvest 1804] UNKNOWN error
Stack Trace:
00000000 00000000 00000000 7813b9c2 ZwGetContextThread!ntdll (null)(0) +18
00000000 00000000 00000000 7813b9c2 ZwGetContextThread!ntdll (null)(0) +18
]
*ERROR* [2015-02-10 00:48:13] In [game.cpp::Glest::Game::Game::update Line: 2785] Error [In [..\..\source\glest_game\world\unit_updater.cpp::Glest::Game::UnitUpdater::updateHarvest 1804] UNKNOWN error
Stack Trace:
00000000 00000000 00000000 7813b9c2 ZwGetContextThread!ntdll (null)(0) +18
00000000 00000000 00000000 7813b9c2 ZwGetContextThread!ntdll (null)(0) +18
Stack Trace:
00000000 00000000 00000000 7813b7ae ZwGetContextThread!ntdll (null)(0) +18
00000000 00000000 00000000 7813b7ae ZwGetContextThread!ntdll (null)(0) +18
]
i added a key press event in game.cpp
void Game::keyPress(SDL_KeyboardEvent c) {
if(this->masterserverMode == true) {
return;
}
if(gameStarted == false || totalRenderFps <= 0) {
return;
}
try
{
if(c.keysym.sym==SDLK_SEMICOLON)
{
Plan P;
P.Test(scriptManager);
return;
}
}
catch(const exception &ex) {
//LogFile::WriteLogFile(ex.what());
ErrorDisplayMessage(ex.what(),true);
}
if(currentUIState != NULL) {
currentUIState->keyPress(c);
return;
}
chatManager.keyPress(c);
}
and here's what i try to execute
void Plan::Test(ScriptManager scriptManager)
{
try
{
LogFile::WriteLogFile("begin testing");
scriptManager.giveResource("gold",0,100);
}
catch(const exception &ex) {
LogFile::WriteLogFile(ex.what());
}
}