diff --git a/src/script/api/script_asyncmode.cpp b/src/script/api/script_asyncmode.cpp --- a/src/script/api/script_asyncmode.cpp +++ b/src/script/api/script_asyncmode.cpp @@ -39,8 +39,8 @@ ScriptAsyncMode::ScriptAsyncMode(HSQUIRR throw sq_throwerror(vm, "Argument must be a boolean"); } - this->last_mode = this->GetDoCommandMode(); - this->last_instance = this->GetDoCommandModeInstance(); + this->last_mode = this->GetDoCommandAsyncMode(); + this->last_instance = this->GetDoCommandAsyncModeInstance(); this->SetDoCommandAsyncMode(sqasync ? &ScriptAsyncMode::AsyncModeProc : &ScriptAsyncMode::NonAsyncModeProc, this); }