local dura = inventory:getMainHandDurability();
printf("Durability:%s\n", dura);
if( dura > 99 ) then
player.free_flag1 = true;
end
That means if durability is greater than 99, it will set the flag to true and load the repair path. Now I tried using dura < 50, but I got a error, so how would I do less than 50?
deathdealer1252 wrote:Yeah, was thinking of doing it that way, guess just do not understand why you can not use <, but that means the same exact thing correct?
Yes the same thing.
'a < b' is the same as 'b > a'
'a <= b' is the same as 'b >= a'
Like the error says, it thinks it's the start of a xml tag so it errors. There are 2 other solutions that I know of. One involves replacing the '<' with some special code that means the same thing but I can never remember it. The other is to enclose the lua in CDATA tags like the examples at the bottom of the default.xml profile. I find my solution the easiest. Just remember, when you want to use '<' in an xml file, just flip it round.
Please consider making a small donation to me to support my continued contributions to the bot and this forum. Thank you. Donate
I check all posts before reading PMs. So if you want a fast reply, don't PM me but post a topic instead. PM me for private or personal topics only.
That makes sense, did not think of it as a XML when I was trying to figure it out, but that makes perfect sense! Your solution is the easiest to me, but if I where to enclose it in CDATA tags, I could use less than, without a problem?
deathdealer1252 wrote:That makes sense, did not think of it as a XML when I was trying to figure it out, but that makes perfect sense! Your solution is the easiest to me, but if I where to enclose it in CDATA tags, I could use less than, without a problem?
Thank you both for the help, back to finishing up the profile / waypoints. On a side note, the cpawn error, that is caused by running to many clients correct?