Page 1 of 1
undefined player.Class1 in settings.lua, causes bot to stop
Posted: Sun Nov 06, 2011 9:15 pm
by s018mes
What is causing this error in my DOD bot runs? My bot runs for maybe an hour and then stops.
Code: Select all
No ranged skills specified in profile; Turning COMBAT_RANGED_PULL off.
8:3pm - undefined player.Class1 in settings.lua
Re: undefined player.Class1 in settings.lua, causes bot to s
Posted: Sun Nov 06, 2011 10:42 pm
by rock5
My guess would be that your client crashed.
Re: undefined player.Class1 in settings.lua, causes bot to s
Posted: Sun Nov 06, 2011 11:03 pm
by s018mes
No the Client is always up and running.
It also seems to occur after zoning out of DOD.
Would some code like wait for loading screen fix this?
Re: undefined player.Class1 in settings.lua, causes bot to s
Posted: Sun Nov 06, 2011 11:21 pm
by s018mes
I think I have figured it out, the last Waypoint for my character to zone out of DOD is just short of him zoning out. So I am going to change the waypoint. Otherwise he turns, runs into the wall and takes like 4-5 more seconds to eventually zone out.
Re: undefined player.Class1 in settings.lua, causes bot to s
Posted: Sun Nov 06, 2011 11:30 pm
by rock5
Yep. My next guess was it's trying to get info from memory while zoning. Are you using "waitForLoadingScreen()"?
Re: undefined player.Class1 in settings.lua, causes bot to s
Posted: Mon Nov 07, 2011 7:11 am
by s018mes
No I did not put in "waitForLoadingScreen()". Instead I tried changing the waypoints. I watched it 2x to see it and it did work both times walking directly out of the zone. But I checked only 1 hour later and same result. I will try "waitForLoadingScreen()" next.
Re: undefined player.Class1 in settings.lua, causes bot to s
Posted: Tue Jan 03, 2012 4:42 pm
by imaginethat
Hi
Happy New Year all
I have just started running my bot again for this year, and it has come up with the error mentioned in this post. This is a waypoint sript this bot has run at least 10 times before without any issue.
I noticed that in my debug code just before this error, my out put is showing player.Class1 = 4. The bot is a Mage so this number is correct, but I thought player.Class1 should return the name of the class. The settings.lua is also expecting player.Class1 to be non-numeric.
Any thoughts on the supposed returned type of player.Class1 ?
Thanks
Re: undefined player.Class1 in settings.lua, causes bot to s
Posted: Tue Jan 03, 2012 8:08 pm
by lisa
At the start of pawn.lua the variables for class are set, the game itself uses numbers, we tell the bot it can use these names aswell but yes game uses numbers and so most prints will do the respective number.
Code: Select all
CLASS_NONE = -1;
CLASS_WARRIOR = 1;
CLASS_SCOUT = 2;
CLASS_ROGUE = 3;
CLASS_MAGE = 4;
CLASS_PRIEST = 5;
CLASS_KNIGHT = 6;
CLASS_WARDEN = 7;
CLASS_DRUID = 8;
So in settings.lua it has this
so it checks if they are the same and CLASS_WARRIOR is defined in pawn.lua as = 1, so it does player.Class1 == 1
Basically it is done so we don't have to remember what number each class is and can just use CLASS_WARRIOR.