widelands-dev team mailing list archive
-
widelands-dev team
-
Mailing list archive
-
Message #17071
Re: [Merge] lp:~widelands-dev/widelands/AI-fixes into lp:widelands
I think I found the problem:
(bo.outputs.size() == 1) means that there is 1 entry at index 0.
(tribe_->get_ware_descr(bo.outputs.at(1)) would only be available if bo.outputs.size() > 1
Unlike Lua, C++ starts counting from 0. Actually, Lua is quite exceptional here, since starting from 0 is the usual way of doing arrays.
--
https://code.launchpad.net/~widelands-dev/widelands/AI-fixes/+merge/367309
Your team Widelands Developers is subscribed to branch lp:~widelands-dev/widelands/AI-fixes.
References