Error: memoryReadInt (number, expected, got nil)

Runes of Magic/Radiant Arcana (http://www.runesofmagic.com)
Post Reply
Message
Author
haringpb
Posts: 29
Joined: Fri Feb 22, 2013 1:19 pm

Error: memoryReadInt (number, expected, got nil)

#1 Post by haringpb » Sun Jun 09, 2013 5:55 am

Hey there since updating rom bot on 758 (i guess) i get bad argument in memoryReadInt (number, expected, got nil), when loading my Andor script

Code: Select all

<?xml version="1.0" encoding="utf-8"?>
<waypoints>
	<onLoad>

	
		-- V 3.7
		<![CDATA[
		
			--=== user options ===--
			-- it will stop once this score is reached, bonuses will be added afterwards though 
			-- so 2700 will probably be total score of 3100
			local requiredscore = 9000
			
			-- alter to your local language, caps sensative, in english is "Go!!!", so "Go" is enough
			local goMessage = "Go"		
		

			for k,v in pairs(settings.profile.skills) do
				v.AutoUse = false
			end

			id_kate		= 121035
			id_magelly	= 120687

			-- Move to Kate Wesker and enter
			if getZoneId() == 2 then
				repeat
					yrest(500)
				until player:target_NPC(id_kate)

				repeat
					yrest(500)
				until ChoiceOptionByName(getTEXT("SKWERL_MOBIUS_24")) 

				yrest(1000)
				waitForLoadingScreen()
			end
			
			-- Move to Magelly Basac
			repeat
				yrest(500)
			until player:target_NPC(id_magelly)

			-- Check if we already completed
			repeat
				yrest(500)
			until ChoiceOptionByName(getTEXT("SKWERL_MOBIUS_14")) 
			
 
			repeat
				yrest(500)
			until ChoiceOptionByName(getTEXT("SKWERL_MOBIUS_25")) 
			

			repeat
				yrest(500)
			until ChoiceOptionByName(getTEXT("SYS_OKAY")) 
			yrest(1000)

			local round = 0
			local score = 0

			function tort()
				local proc = getProc()
				
				local function checkclicked(address)
					local tmp = memoryReadRepeat("int", proc, address + addresses.pawnAttackable_offset) or 0;
					if bitAnd(tmp,0x8) then
						return true
					else
						return false
					end
				end

				local function one(ID)
					--print("targeting: "..ID)
					local objectList = CObjectList();
					objectList:update();
					local objSize = objectList:size()
					for i = 0,objSize do 
						obj = objectList:getObject(i)
						obj:update()
						if (obj.Id == ID or ID == 106885) and checkclicked(obj.Address) then
							player:target(obj)
							RoMScript("UseExtraAction(1)")
							yrest(10)
							player:target(obj)
							RoMScript("UseExtraAction(1)")
							if ID == 106883 then
								yrest(10)
								player:target(obj)
								RoMScript("UseExtraAction(1)")	
							end
							yrest(100)
						end
					end
				end
				if player:findNearestNameOrId(106881,106882,106883,106884) then
					--== monitor chat
					EventMonitorStart("Tortevent", "SYSTEM_MESSAGE");
					local time, moreToCome, name, msg, _go 
					repeat
						time, moreToCome, name, msg = EventMonitorCheck("Tortevent",1)
						yrest(10)
						if name and string.find(name,goMessage) then
							_go = true
						end
					until _go == true
					EventMonitorStop("Tortevent")
					round = round + 1
					print("Wave: "..round..", Score: "..score)
					repeat
						one(106882)
						one(106882)
						one(106882)
						one(106881)
						one(106883)
						one(106884)
					until not player:findNearestNameOrId(106881,106882,106883,106884)
				end
			end

			repeat
				yrest(100)
			until  player:findNearestNameOrId(106881)
			print("OK event has started")
			repeat
				tort()
				player:update()
				yrest(100)
				buffed = player:getBuff(622402)
				if buffed then score = buffed.Level end
			until not player:hasBuff(622402) or ( buffed and buffed.Level > requiredscore )
			yrest(5000)
			sendMacro("CloseWindows()")
			player:target_NPC("Magelly Basac")
			yrest(10000)
			RoMScript("ChoiceOption(1)")
			yrest(1999)
			sendMacro('StaticPopup_OnClick(StaticPopup1, 1);')
			waitForLoadingScreen();
			player:update();
		        loadPaths("Course_of_Terror_Wp.xml");
		]]>
	</onLoad>
</waypoints>
It get the error when opening the dialog window to go into andor.
Hoping for your help haringpb ;)

User avatar
rock5
Posts: 12173
Joined: Tue Jan 05, 2010 3:30 am
Location: Australia

Re: Error: memoryReadInt (number, expected, got nil)

#2 Post by rock5 » Sun Jun 09, 2013 6:10 am

Please copy the whole error message including line number. For instructions on how to copy and paste in MM check my signature.
  • 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.
  • How to: copy and paste in micromacro
    ________________________
    Quote:
    • “They say hard work never hurt anybody, but I figure, why take the chance.”
          • Ronald Reagan

haringpb
Posts: 29
Joined: Fri Feb 22, 2013 1:19 pm

Re: Error: memoryReadInt (number, expected, got nil)

#3 Post by haringpb » Sun Jun 09, 2013 6:25 am

.../script/rom/functions.lua:2311: bad argument #2 to 'memoryReadInt' (number expeced, got nil)

is the error report i got.

User avatar
rock5
Posts: 12173
Joined: Tue Jan 05, 2010 3:30 am
Location: Australia

Re: Error: memoryReadInt (number, expected, got nil)

#4 Post by rock5 » Sun Jun 09, 2013 6:46 am

As I suspected it has something to do with the new getText function but I don't get it . 'argument #2' is addresses.getTEXT which does exist so why does yours say it equals nil? Try starting the commandline and typing a few test commands eg.

Code: Select all

print(addresses.getText)
print(getTEXT("SKWERL_MOBIUS_24"))
  • 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.
  • How to: copy and paste in micromacro
    ________________________
    Quote:
    • “They say hard work never hurt anybody, but I figure, why take the chance.”
          • Ronald Reagan

haringpb
Posts: 29
Joined: Fri Feb 22, 2013 1:19 pm

Re: Error: memoryReadInt (number, expected, got nil)

#5 Post by haringpb » Sun Jun 09, 2013 7:00 am

ok print(addresses.getText) gets me nil and the secound task returns the error postet earlier.
Should there be an getText in addresses.lua? because there is none for me.

User avatar
rock5
Posts: 12173
Joined: Tue Jan 05, 2010 3:30 am
Location: Australia

Re: Error: memoryReadInt (number, expected, got nil)

#6 Post by rock5 » Sun Jun 09, 2013 7:56 am

You might have got a conflicted file when doing SVN update. Please don't ignore conflicts. Try doing an SVN revert on addresses.lua and any other conflicted files.
  • 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.
  • How to: copy and paste in micromacro
    ________________________
    Quote:
    • “They say hard work never hurt anybody, but I figure, why take the chance.”
          • Ronald Reagan

haringpb
Posts: 29
Joined: Fri Feb 22, 2013 1:19 pm

Re: Error: memoryReadInt (number, expected, got nil)

#7 Post by haringpb » Sun Jun 09, 2013 9:20 am

allright after making new rom folder making svn upadte and coping the addresses.lua into my old folder it finaly works thanks a lot.

User avatar
rock5
Posts: 12173
Joined: Tue Jan 05, 2010 3:30 am
Location: Australia

Re: Error: memoryReadInt (number, expected, got nil)

#8 Post by rock5 » Sun Jun 09, 2013 9:54 am

All you had to do was right-click the addresses.lua file and select "TortoiseSVN/Revert".
  • 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.
  • How to: copy and paste in micromacro
    ________________________
    Quote:
    • “They say hard work never hurt anybody, but I figure, why take the chance.”
          • Ronald Reagan

haringpb
Posts: 29
Joined: Fri Feb 22, 2013 1:19 pm

Re: Error: memoryReadInt (number, expected, got nil)

#9 Post by haringpb » Sun Jun 09, 2013 10:20 am

No i did so first, but didnt work. Anyhow its working as it should now ;)

Post Reply

Who is online

Users browsing this forum: Ahrefs [Bot] and 2 guests