Rock5,
I decided to remove that part of the code so I could proceed with getting the other parts of my files working. I've got my bots communicating with partychat and it started working good. Now I have this really weird error:
Moving to waypoint #42, (1234, 2906)
Leader Monitor started.
Did not find any crashed game clients.
11:46pm - scripts\rom/bot.lua:581: Error in your profile: onLeaveCombat error: [
string "..."]:5: attempt to index global 'Player' (a nil value)
Please enter the script name to run.
Type in 'exit' (without quotes) to exit.
Script>
This error happens at waypoint 42 of the follower bot (waypoint file FAlowclass.xml) but it only happens when the Leader bot says in
partychat "proceed", which is supposed to tell the following bot to continue moving (this happens at waypoint 55 of FAmainclass.xml.
I can't figure out why there is an onLeaveCombat at that time because it happens even if neither party member is in combat at the time,
and there are no instructions in the onLeaveCombat section of either profile.
Here's the relevant code for those sections:
FAlowclass.xml:
Code: Select all
<!-- # 40 --><waypoint x="1321" z="2909" y="318"> </waypoint>
<!-- # 41 --><waypoint x="1321" z="2909" y="318"> </waypoint>
<!-- # 42 --><waypoint x="1234" z="2906" y="318">
sendpartychat("Im ready")
eventparty("Leader", "start")
repeat
yrest(1000)
until checkeventparty("Leader", "proceed")
</waypoint>
<!-- # 43 --><waypoint x="1225" z="2972" y="321">
eventparty("Leader", "stop")
</waypoint>
<!-- # 44 --><waypoint x="1219" z="3067" y="323"> </waypoint>
Then here's the section of FAmainclass.xml where the leader is supposed to tell him to proceed, which comes up in party chat just before the MM window gives the error.
Code: Select all
<!-- # 52 --><waypoint x="1254" z="3495" y="445"> </waypoint>
<!-- # 53 --><waypoint x="1313" z="3512" y="464"> </waypoint>
<!-- # 54 --><waypoint x="1323" z="3441" y="454"> </waypoint>
<!-- # 55 --><waypoint x="1390" z="3520" y="475">
sendpartychat("proceed")
</waypoint>
<!-- # 56 --><waypoint x="1532" z="3526" y="487"> </waypoint>
The onLeaveCombat section of both files are default:
Code: Select all
<onLeaveCombat><![CDATA[
-- Additional Lua code to execute after killing an enemy
]]></onLeaveCombat>
I can't understand why I get that error at that time. If you need the complete files o figure this out, let me know. Thanks for any help you can provide.
**UPDATE**
I tried removing the onLeaveCombat section completely from both profiles. At first I thought it would work but it did the same error when it got to waypoint 70 and received the proceed command. Not sure what's going on.