Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我想计算另一个代理的代理数量(代理数量),并在需要时删除或添加它们。
我用过这段代码:
get_Main().Retailer.Inventory.item()
但它不起作用。
通常,您将集合计为“myCollection.size()”。如果您想计算来自另一个代理(例如 AgentA)的 AgentB 代理的数量,您需要正确访问 AgentB 的集合。这取决于它的位置。如果 AgentA 和 AgentB 集合都位于 Main 中,则 AgentA 中的代码如下:
get_Main().AgentB.size()
希望有帮助。