From 2b3e929261d2d9c111f0a2a90142a40b4c213167 Mon Sep 17 00:00:00 2001 From: INSANEMODE Date: Sat, 14 Nov 2020 00:42:57 -0600 Subject: [PATCH] increase delay to avoid trying to set clan tag too early, and avoid an api error displaying to the console. --- functions.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/functions.cpp b/functions.cpp index a5239ae..bf3b4e6 100644 --- a/functions.cpp +++ b/functions.cpp @@ -94,9 +94,10 @@ namespace Game changeClanTag = changeClanTag_str.c_str(); if ((strstr(currentClanTag, changeClanTag) == NULL) || (strstr(changeClanTag, "Error: Client info is null") == NULL)) { - std::cout << "ClanTag Rank: [" + changeClanTag_str + "]" + currentname + '\n'; + if(!(changeClanTag_str.find("Error:") != std::string::npos) && !(changeClanTag_str.find("User") != std::string::npos)) { + std::cout << "ClanTag Rank: [" + changeClanTag_str + "]" + currentname + '\n'; memcpy((void*)(clientAddr + (clientOffset * i) + clanTagAddr), changeClanTag, 8); } @@ -113,7 +114,7 @@ namespace Game { while (true) { - std::this_thread::sleep_for(std::chrono::milliseconds(5000)); + std::this_thread::sleep_for(std::chrono::milliseconds(10000)); clanTagChanger(); }