Closed vampiricwulf closed 7 years ago
Hi!
The problem here is that the freestanding functions that return the const begin and end (cbegin and cend()) were added in C++14 which was subsequently enabled as "-std=c++14" in gcc5. The requirement is stated in the README.md:
Note: gcc version needs to be 5 or higher along with a compatible libc.
If upgrading gcc is a really big problem, it would be easier just to remove the 'c's (cbegin(foo) -> begin(foo) and cend(foo) -> end(foo)) or rewrite the problem lines with foo.cbegin()/foo.cend() (member functions).
(Or build it using the clang-3.8, this should work nicely! ie. "CC=clang CXX=clang++ make")
Oh my god! I read "5" as "4.5"... Thank you for your fast response, I'll add a new post when I've attempted the solution.
Btw. just to put it out there, the master branch is currently in development and super-buggy. Please use the revision fc804dd8d2135940e1d4468039853664d2d44602 or older!
[CONFIG] loading file [aura.cfg]
[AURA] starting up
[AURA] using monotonic timer with resolution 1.000000 nanoseconds
[SQLITE3] version 3.15.1
[SQLITE3] opening database [aura.dbs]
[SQLITE3] found schema number [1]
[AURA] Aura++ version 1.31 - with GProxy++ support
[UDPSOCKET] using default broadcast target
[AURA] listening for GProxy++ reconnects on port 6113
[AURA] warning - irc connection not found in config file
[AURA] found battle.net connection #1 for server [useast.battle.net]
[AURA] loading MPQ file [War3/War3Patch.mpq]
[AURA] extracting Scripts\common.j from MPQ file to [mapcfgs/common.j]
[AURA] extracting Scripts\blizzard.j from MPQ file to [mapcfgs/blizzard.j]
[CONFIG] loading file [mapcfgs/wormwar.cfg]
[MAP] loading MPQ file [War3/Maps/(12)WormWar.w3x]
[MAP] calculated map_size = 72 212 5 0
[MAP] calculated map_info = 28 52 154 58
[MAP] calculated map_crc = 80 141 86 241
[MAP] calculated map_sha1 = 160 89 184 120 166 55 95 114 63 230 155 36 118 153 96 118 156 58 60
[MAP] calculated map_options = 0
[MAP] calculated map_width = 84 0
[MAP] calculated map_height = 84 0
[MAP] calculated map_numplayers = 12
[MAP] calculated map_numteams = 1
[MAP] calculated map_slot1 = 0 255 0 0 0 0 8 1 100
[MAP] calculated map_slot2 = 0 255 0 0 0 1 8 1 100
[MAP] calculated map_slot3 = 0 255 0 0 0 2 8 1 100
[MAP] calculated map_slot4 = 0 255 0 0 0 3 8 1 100
[MAP] calculated map_slot5 = 0 255 0 0 0 4 8 1 100
[MAP] calculated map_slot6 = 0 255 0 0 0 5 8 1 100
[MAP] calculated map_slot7 = 0 255 0 0 0 6 8 1 100
[MAP] calculated map_slot8 = 0 255 0 0 0 7 8 1 100
[MAP] calculated map_slot9 = 0 255 0 0 0 8 8 1 100
[MAP] calculated map_slot10 = 0 255 0 0 0 9 8 1 100
[MAP] calculated map_slot11 = 0 255 0 0 0 10 8 1 100
[MAP] calculated map_slot12 = 0 255 0 0 0 11 8 1 100
[MAP] overriding calculated map_size with config value map_size = 201 213 5 0
[MAP] overriding calculated map_info with config value map_info = 206 105 219 80
[MAP] overriding calculated map_crc with config value map_crc = 15 15 71 22
[MAP] overriding calculated map_sha1 with config value map_sha1 = 91 92 122 144 89 127 250 70 133 235 247 76 193 31 109 105 36 250 36 16
[MAP] overriding calculated map_filter_type with config value map_filter_type = 2
[MAP] overriding calculated map_width with config value map_width = 84 0
[MAP] overriding calculated map_height with config value map_height = 84 0
[MAP] overriding calculated map_numplayers with config value map_numplayers = 12
[MAP] overriding calculated map_numteams with config value map_numteams = 1
[MAP] overriding slots
[MAP] invalid map_size detected - size mismatch with actual map data
[AURA] started loading [ip-to-country.csv]
[AURA] iptocountry data: 10% loaded
[AURA] iptocountry data: 20% loaded
[AURA] iptocountry data: 30% loaded
[AURA] iptocountry data: 40% loaded
[AURA] iptocountry data: 50% loaded
[AURA] iptocountry data: 60% loaded
[AURA] iptocountry data: 70% loaded
[AURA] iptocountry data: 80% loaded
[AURA] iptocountry data: 90% loaded
[AURA] iptocountry data: 100% loaded
[AURA] finished loading [ip-to-country.csv]
[BNET: USEast] connecting to server [useast.battle.net] on port 6112
[BNET: USEast] resolved and cached server IP address 199.108.55.51
[BNET: USEast] connected
[TCPSOCKET] closed by remote host
[BNET: USEast] disconnected from battle.net
^C[!!!] caught signal SIGINT, exiting NOW
[AURA] shutting down
[SQLITE3] closing database [aura.dbs]
Why is my connection being closed?
Well this is usually a sign something is wrong ie. version, user&pass, cd keys, etc. Are you sure what you've entered is correct? If you are, I'll take a look at what is being sent as it's possible that recent modernization efforts changed a bit here and there.
Version: I used my up to date files User & Pass: tested it on my account I frequently use CD keys: ones I use to play I am not logged onto my account on b.net when I try to run the bot, so the key and the account aren't in use.
OK, good enough. I'll debug the logon and see what's up. Like mentioned before, it's really possible I dun goofed.
Alright~ Keep me posted on the results.
Could you please try with the same revision but patch in the commit f8023fc99e8965ba4ed0f1cf28a39ee59991fcaa (cherry-pick it).
Maybe it's even easier to just modify it yourself since it's so small and I'll continue the work on the project soon-ish so the master is usable once more.
-return std::vector<uint8_t>(a, a + size - 1);
+return std::vector<uint8_t>(a, a + size);
Just to confirm that's all I had to change, that's all I did. I mention it because at the revision https://github.com/Josko/aura-bot/commit/fc804dd8d2135940e1d4468039853664d2d44602 (you mentioned to use earlier) util.h doesn't use uint_fast8_t
.
Also I wish you mentioned that doing make clean; make
would delete my cfg, because it took me a while to put it back together ;_;.
Also, it fixed it!
Yup, just the "- 1" part. And make
didn't do it, probably git
commands (like git checkout .
). Thanks for the feedback!