Page 1 of 2

syntax error in bot

Posted: Wed Mar 19, 2014 9:40 pm
by shakira
Hi just wanted to let you know since the new patch 6.07 there as been a problem with the bot could you please fix this problem thankyou much rock5

lisa, please dont respond if you cant help. thanks.

Re: syntax error in bot

Posted: Wed Mar 19, 2014 9:44 pm
by Administrator
A syntax error isn't going to appear when the game updates. You probably broke something when using the SVN update for the scripts and so should probably revert the changes.

That, and if you have an error, you need to give some actual details, not just "Oh there's a problem somewhere. Good luck digging through 20,000 lines of code to find it."

Re: syntax error in bot

Posted: Wed Mar 19, 2014 10:24 pm
by ZZZZZ
Mine still works fine with the new patch so there is nothing wrong with the bot itself.

Re: syntax error in bot

Posted: Wed Mar 19, 2014 11:29 pm
by i1own0u
mine isn't working;

scripts\rom\bot.lua:86:...b/desktop/micromacro/scripts/rom/classes/memorytable.lua:7: bad arguement #2 to 'memoryReadUIntPtr' (number expected, got nil)

Re: syntax error in bot

Posted: Wed Mar 19, 2014 11:40 pm
by rock5
Maybe the version of the bot doesn't match the version of the game. What client version are you using?

Re: syntax error in bot

Posted: Wed Mar 19, 2014 11:42 pm
by i1own0u
us

version 6.0.7.2691.en

latest patch was today for the anniversary.

micromacro vs 1.04.163
rombot revision 772

Re: syntax error in bot

Posted: Thu Mar 20, 2014 12:22 am
by rock5
Sorry, I didn't realize it changed again today. I'll update and check it.

Re: syntax error in bot

Posted: Thu Mar 20, 2014 1:04 am
by rock5
I tested it. I didn't do much but it starts ok.

Maybe you need to do a revert on your rom folder.

Re: syntax error in bot

Posted: Thu Mar 20, 2014 1:35 am
by i1own0u
i reverted, nothing fixed.

also reinstalled the whole rombot entirely from scratch, but same issue.

doing a rom\update.lua causes it to actually start, but leaves me with

/classes/pawn.lua:780: attempt to index local 'self' (a number value)

Re: syntax error in bot

Posted: Thu Mar 20, 2014 1:59 am
by lisa
i1own0u wrote:/classes/pawn.lua:780: attempt to index local 'self' (a number value)
rev 772 has this in pawn.lua line 780

Code: Select all

				-- Take of end numbers
So that error doesn't match the default for latest version of bot.

shakira wrote:lisa, please dont respond if you cant help. thanks.
Huh?

Re: syntax error in bot

Posted: Thu Mar 20, 2014 2:11 am
by Vengefulmilk
I had the same error. I removed the userfunction Attackspeed Addon Zero or whatever its name is, and then the error showed up that my ingamefunctions were out of date. Now I'm all set.

Re: syntax error in bot

Posted: Thu Mar 20, 2014 2:24 am
by i1own0u
alright so i did that, and i got the updated version (i was at 7, latest is 10) and now:

pawn.lua:757: attempt to index local 'self' (a number value)

rombot version 3.29, revision 772
game version 6.0.7.2691

Code: Select all

function CPawn:getTarget()
	self:updateTargetPtr();
	if( self.TargetPtr ) then
		return CPawn(self.TargetPtr);
	else
		return nil;
	end
end

function CPawn:isAlive()
	-- Check if still valid target
	if not self:exists() then
		return false
	end

	-- Dead
	self:updateHP()
	if( self.HP < 1 ) then
		return false;
	end

	-- Also dead (and has loot)
	self:updateLootable()
	if( self.Lootable ) then
		return false;
	end

	self:updateAlive()
	if( not self.Alive ) then
		return false;
	end

	return true
somewhere in there right? i should really get notepad+ lol

Re: syntax error in bot

Posted: Thu Mar 20, 2014 2:40 am
by ZZZZZ
Interesting....I got this error just as I was reading this thread lol. I had already run my TinaEvent waypoint on numerous characters then upon running the same thing just now i got this error:

Code: Select all

The game client did not crash.
6:37pm - E:/micromacro/scripts/rom/classes/pawn.lua:757: attempt to index local
'self' (a number value)
Just odd seeing as I had been using the bot most the day xD

Re: syntax error in bot

Posted: Thu Mar 20, 2014 2:57 am
by lisa
757 is the buffs, updating official client now, I'll see what is going on.

Re: syntax error in bot

Posted: Thu Mar 20, 2014 3:05 am
by rock5
ZZZZZ wrote:pawn.lua:757: attempt to index local
'self' (a number value)
The only only way I can see 'self' equalling a number is if somewhere you are using pawn.hasBuff(args). Notice the perios(.) instead of a semicolon(:). In this case 'self' will be taken from the first argument which can be a number.

The bot has no ".hasBuff" in it. I just did a search and the only one I found was in TinaEvent2014.xml which I just downloaded now to have a look at. So that's your problem. The error is on line 16.

Code: Select all

if not player.hasBuff(506688) and inventory:itemTotalCount(207204) > 0 then
You probably didn't get the error earlier because it didn't encounter that code, ie. it was already mounted.

Re: syntax error in bot

Posted: Thu Mar 20, 2014 3:10 am
by lisa
have a look at userfunctions or what WP you are doing when it crashed.

I just did an player update and printed the entire player table and everything was fine. Just ran andor training and it was fine aswell, no crashes.

I think you might be off the mark there rock, it wouldn't error in the function if they had a . instead of : because it wouldn't be calling that function.

player.hasBuff() wouldn't call the function player:hasBuff()

There is definately an issue if it is saying player is a number but mine is working fine, so I couldn't imagine the issue.

All I can suguest to check your userfunctions and which WP you are using.


--=== Added ===--
I stand corrected.

Code: Select all

Command> print(player.hasBuff(100400))
onLoad error: C:/micromacro/scripts/rom/classes/pawn.lua:757: attempt to index l
ocal 'self' (a number value)
Did a notepad ++ search in files and there is no player.hasBuff in default bot, must either an edit has been done or a userfunction/WP code needs fixing.

Code: Select all

Search ".hasBuff" (0 hits in 0 files)
Search "player.hasBuff" (0 hits in 0 files)
Since it is in pawn.lua don't limit your search to just player.hasBuff as it might be pawn.hasBuff or any other variable you might have, so try a search for
.hasBuff(

Re: syntax error in bot

Posted: Thu Mar 20, 2014 3:21 am
by rock5
That's what I did, I searched for ".hasBuff".

Re: syntax error in bot

Posted: Thu Mar 20, 2014 3:25 am
by ZZZZZ
.....fking hell...lol. Hate little things like that :/

Re: syntax error in bot

Posted: Thu Mar 20, 2014 3:30 am
by lisa
ZZZZZ wrote:.....fking hell...lol. Hate little things like that :/
So how do you all have the exact same issue?
and why is it only appearing after a patch?

*puts on tinfoil hat*
You all got get files from another site and they broke the bot, go on admit it.
LOL

Re: syntax error in bot

Posted: Thu Mar 20, 2014 3:33 am
by ZZZZZ
lisa wrote: So how do you all have the exact same issue?
and why is it only appearing after a patch?

*puts on tinfoil hat*
You all got get files from another site and they broke the bot, go on admit it.
LOL
Na, I uploaded a waypoint for the current Tina event. We all must have hit that error on the same file xD

My bad :roll:

http://www.solarstrike.net/phpBB3/viewt ... =27&t=5629

Also explains why I only got the error running that file considering I had run dailies/mini's etc....just didnt think of it due to running that specific waypoint a number of times already :/