Update BRClient.Init to receive bool result

This commit is contained in:
Tyler Hallada 2020-10-17 19:22:57 -04:00
parent 00e99bba2e
commit 083c6a7f6e
2 changed files with 11 additions and 4 deletions

View File

@ -1,10 +1,17 @@
#include "bindings.h" #include "bindings.h"
void Init(RE::StaticFunctionTag*) bool Init(RE::StaticFunctionTag*)
{ {
logger::info("Entered Init"); logger::info("Entered Init");
init(); bool result = init();
logger::info("Init done"); if (result) {
logger::info("Init successful");
return true;
}
else {
logger::error("Init failed");
return false;
}
} }
std::string GenerateApiKey(RE::StaticFunctionTag*) std::string GenerateApiKey(RE::StaticFunctionTag*)

View File

@ -1,5 +1,5 @@
#pragma once #pragma once
void Init(RE::StaticFunctionTag*); bool Init(RE::StaticFunctionTag*);
std::string GenerateApiKey(RE::StaticFunctionTag*); std::string GenerateApiKey(RE::StaticFunctionTag*);
bool StatusCheck(RE::StaticFunctionTag*, RE::BSFixedString api_url, RE::TESQuest* quest); bool StatusCheck(RE::StaticFunctionTag*, RE::BSFixedString api_url, RE::TESQuest* quest);