Error stating arithmetic on local 'endloc' (a nil value)

Runes of Magic/Radiant Arcana (http://www.runesofmagic.com)
Message
Author
BeyondNames
Posts: 104
Joined: Thu Jun 27, 2013 7:39 pm

Error stating arithmetic on local 'endloc' (a nil value)

#1 Post by BeyondNames » Sat Oct 12, 2013 11:34 am

I was just farming and i came back to my PC with this error the error did not occur right away when i started the WP

Code: Select all

Use MACRO: MAGE_ELEMENTAL_WEAKN=>   * Failed to cast *
The game client did not crash.
9:59pm - ...Files (x86)/ROM PVP/micromacro/scripts/rom/functions.lua:2298: attem
pt to perform arithmetic on local 'endloc' (a nil value)


AL lib: FreeContext: (027CCCC8) Deleting 1 Source(s)
Please enter the script name to run.
Type in 'exit' (without quotes) to exit.
Script>
Any help would be greatly appreciated :)

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

Re: Error stating arithmetic on local 'endloc' (a nil value)

#2 Post by rock5 » Sat Oct 12, 2013 11:53 am

It has something to do with either getTEXT() or getCurrency() functions, neither of which the bot uses. Do you use one of those functions in your waypoint file? Maybe there is something wrong with the way you are using it.
  • 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

BeyondNames
Posts: 104
Joined: Thu Jun 27, 2013 7:39 pm

Re: Error stating arithmetic on local 'endloc' (a nil value)

#3 Post by BeyondNames » Sun Oct 13, 2013 11:58 am

The only functions I'm using is set window count players and log into different char

BeyondNames
Posts: 104
Joined: Thu Jun 27, 2013 7:39 pm

Re: Error stating arithmetic on local 'endloc' (a nil value)

#4 Post by BeyondNames » Sun Oct 13, 2013 12:09 pm

Just got this

Code: Select all

MicroMacro v1.03
SolarStrike Software
http://www.solarstrike.net
Opening bot.lua...
Starting script execution - Press CTRL+C to exit.
Press CTRL+L to cancel execution and load a new script.
-------------------------------------------------------------------------------
Installing userfunctions.
We read the hotkey settings from your bindings.txt file C:\Users\----\My Document
s\Runes of Magic\bindings.txt instead of using the settings.xml file.
ññññññññññññññññññññññññññññññññññññññññññññññññññññññññññññññññññññññññññ
ññññññññññññññññññññññññññññññññññññññññññññññññññññññññññññññññññññññññññ
ññññññññññññññññññññññññññññññññññññññññññññññññññññññññññññññññññññññññññ
ññññññññññññññññññññññññññññññññññññññññññññññññññññññññññññññññññññññññññ
ññññññññññññññññññññññññññññññññññññññññññññññññññññññññññññññññññññññññññ
ññññññññññññññññññññññññññññññññññññññññññññññññññññññññññññññññññññññññññ
ññññññññññññññññññññññññññññññññññññññññññññññññññññññññññññññññññññññññññ
ññññññññññññññññññññññññññññññññññññññññññññññññññññññññññññññññññññññññññ
ññññññññññññññññññññññññññññññññññññññññññññññññññññññññññññññññññññññññññ
ññññññññññññññññññññññññññññññññññññññññññññññññññññññññññññññññññññññññññ
ññññññññññññññññññññññññññññññññññññññññññññññññññññññññññññññññññññññññññ
ññññññññññññññññññññññññññññññññññññññññññññññññññññññññññññññññññññññññññ
ññññññññññññññññññññññññññññññññññññññññññññññññññññññññññññññññññññññññññ
ññññññññññññññññññññññññññññññññññññññññññññññññññññññññññññññññññññññññññ
ññññññññññññññññññññññññññññññññññññññññññññññññññññññññññññññññññññññññññ
ññññññññññññññññññññññññññññññññññññññññññññññññññññññññññññññññññññññññññ
ññññññññññññññññññññññññññññññññññññññññññññññññññññññññññññññññññññññññññ
ññññññññññññññññññññññññññññññññññññññññññññññññññññññññññññññññññññññññññ
ññññññññññññññññññññññññññññññññññññññññññññññññññññññññññññññññññññññññññ
Welcome to rom bot! press END to quitñññññññññññññññññññññññññññññññññññññ
RoM Bot Version 3.29, Revision 761ññññññññññññññññññññññññññññññññññññññññ
Press the (End) key to stop/pause the script.
You can resume with the (Delete) key.
Game Version is 6.0.2.2662
RoM windows size is 1920x1028, upper left corner at 0,22
Loading profile Trorlea.xml
Testing 'ingamefunctions' macro. If it gets stuck here, please update the 'ingam
efunctions' by copying the 'ingamefunctions' folder from 'rom/devtools' to the g
ames 'interface/addons' folder.
MACRO Test: ok
Ranged skill found: MAGE_ELEMENTAL_WEAKNESS
[DEBUG] CPU Frequency 4101.757
Waypoint files from C:/Program Files (x86)/ROM PVP/micromacro/scripts/rom:
  0: wander                  1: #1DogMeat.xml          
Enter the number of the path you want to use and press Enter > 1
You chose 1
Loaded waypoint path #1DogMeat.xml
No return path with default naming #1DogMeat_return.xml found.
We use the normal waypoint path #1DogMeat.xml now.
Waypoint #59 is closer then #1. Hence we start with waypoint #59.
Moving to waypoint #59, (6438, 4343)
Stopping waypoint: Target acquired before moving.
Engaging enemy [Inferno Guard Dog] in combat.
Moving in | Suggested range: 250 | Distance: 375
Use MACRO: MAGE_ELEMENTAL_WEAKN=>   Inferno Guard Dog (3242/3242)
Use MACRO: MAGE_ELEMENTAL_CATAL=>   Inferno Guard Dog (3242/3242)
Use MACRO: MAGE_ENERGY_INFLUX  =>   Inferno Guard Dog (3242/3242)
Use MACRO: MAGE_ENERGY_WELL    =>   * Failed to cast *
The game client did not crash.
[b]10:5am - ...Files (x86)/ROM PVP/micromacro/scripts/rom/functions.lua:2298: attem
pt to perform arithmetic on local 'endloc' (a nil value)[/b]


AL lib: FreeContext: (0268CCC8) Deleting 1 Source(s)


I was using the attached WP
Attachments
#1DogMeat.xml
(9.86 KiB) Downloaded 116 times

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

Re: Error stating arithmetic on local 'endloc' (a nil value)

#5 Post by rock5 » Sun Oct 13, 2013 12:34 pm

I think I know where it's happening. Both times I see it happened when it failed to cast. When it fails to cast it checks for any system messages about line o sight and facing the target errors. It uses getTEXT to get your local error message. I still don't know why you are getting the error but I noticed your line numbers don't match up with mine. Are any of your files corrupted? Do any of the files have red or yellow icons next to them in Explorer? If so try doing an svn revert on the rom folder. Or are you using an older version of the bot?
  • 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

BeyondNames
Posts: 104
Joined: Thu Jun 27, 2013 7:39 pm

Re: Error stating arithmetic on local 'endloc' (a nil value)

#6 Post by BeyondNames » Sun Oct 13, 2013 12:41 pm

The address file had a red icon/ exclamation point so i reverted it now there are no files with red icons
im gonna try it again see if it works

BeyondNames
Posts: 104
Joined: Thu Jun 27, 2013 7:39 pm

Re: Error stating arithmetic on local 'endloc' (a nil value)

#7 Post by BeyondNames » Sun Oct 13, 2013 12:48 pm

Its worked so far but once i started the bot it automatically updated and the address file icon went red again but it seems to be working ill update you if anything goes wrong
thx

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

Re: Error stating arithmetic on local 'endloc' (a nil value)

#8 Post by rock5 » Sun Oct 13, 2013 1:02 pm

addresses.lua might legitimately be red if you are using a version of the game that requires the addresses updated. Still, it may have had some corruption so it might have fixed it. If you see "Failed to cast" and it still works then it probably is fixed.
  • 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

BeyondNames
Posts: 104
Joined: Thu Jun 27, 2013 7:39 pm

Re: Error stating arithmetic on local 'endloc' (a nil value)

#9 Post by BeyondNames » Sun Oct 13, 2013 1:11 pm

got the same thing but...

Code: Select all

MicroMacro v1.03
SolarStrike Software
http://www.solarstrike.net
Opening bot.lua...
Starting script execution - Press CTRL+C to exit.
Press CTRL+L to cancel execution and load a new script.
-------------------------------------------------------------------------------
Installing userfunctions.
Enter the number of the path you want to use and press Enter > 1
You chose 1
Loaded waypoint path #1DogMeat.xml
No return path with default naming #1DogMeat_return.xml found.
We use the normal waypoint path #1DogMeat.xml now.
Waypoint #5 is closer then #1. Hence we start with waypoint #5.
Moving to waypoint #5, (6345, 4456)
Stopping waypoint: Target acquired before moving.
Engaging enemy [Inferno Guard Dog] in combat.
Moving in | Suggested range: 250 | Distance: 283
Use MACRO: MAGE_ELEMENTAL_WEAKN=>   Inferno Guard Dog (3242/3242)
Use MACRO: MAGE_ENERGY_WELL    =>   Inferno Guard Dog (3242/3242)
Use MACRO: MAGE_FIREBALL       =>   Inferno Guard Dog (363/3242)
Use MACRO: MAGE_THUNDERSTORM   =>   * Failed to cast *
The game client did not crash.
11:9am - ...Files (x86)/ROM PVP/micromacro/scripts/rom/functions.lua:2298: attem
pt to perform arithmetic on local 'endloc' (a nil value)


AL lib: FreeContext: (0274CCC8) Deleting 1 Source(s)
Please enter the script name to run.
Type in 'exit' (without quotes) to exit.
Script>

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

Re: Error stating arithmetic on local 'endloc' (a nil value)

#10 Post by rock5 » Sun Oct 13, 2013 1:17 pm

What version of the game and bot are you using? The game should be something like 6.x.x and the bot should be something like 766.
  • 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

BeyondNames
Posts: 104
Joined: Thu Jun 27, 2013 7:39 pm

Re: Error stating arithmetic on local 'endloc' (a nil value)

#11 Post by BeyondNames » Sun Oct 13, 2013 2:25 pm

Rombot version 3.29 Revision 761 and rom pvp is 6.0.2.2662.en

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

Re: Error stating arithmetic on local 'endloc' (a nil value)

#12 Post by rock5 » Sun Oct 13, 2013 10:26 pm

getText was updated in 763. Try doing an svn update.
  • 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

BeyondNames
Posts: 104
Joined: Thu Jun 27, 2013 7:39 pm

Re: Error stating arithmetic on local 'endloc' (a nil value)

#13 Post by BeyondNames » Thu Oct 17, 2013 10:03 pm

K will do I've been busy so I'll try to get back to ya by the weekend

BeyondNames
Posts: 104
Joined: Thu Jun 27, 2013 7:39 pm

Re: Error stating arithmetic on local 'endloc' (a nil value)

#14 Post by BeyondNames » Fri Nov 01, 2013 5:14 pm

im at revision 766 now so im gonna try it again
Sry it took me so long to continue to fix this problem ive been extremely busy
I havnt even turned the computer on since last time i responded to this topic

Romplayer
Posts: 120
Joined: Wed Jan 11, 2012 10:07 am

Re: Error stating arithmetic on local 'endloc' (a nil value)

#15 Post by Romplayer » Sat Nov 09, 2013 11:47 am

I am getting the exact same error
revision 766
I happens when it targets a mob to kill but there happens to be a obstacle in the way of casting and attack.

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

Re: Error stating arithmetic on local 'endloc' (a nil value)

#16 Post by rock5 » Sat Nov 09, 2013 12:15 pm

Do you have any corrupt files? Files with red or yellow icons next to them in explorer (excluding addresses.lua which should be red at this stage)? Is the error message exactly the same? Same line number and everything? Are you using the latest micromacro?
  • 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

Romplayer
Posts: 120
Joined: Wed Jan 11, 2012 10:07 am

Re: Error stating arithmetic on local 'endloc' (a nil value)

#17 Post by Romplayer » Sat Nov 09, 2013 12:28 pm

Same line number error, no reds. MM v 1.03

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

Re: Error stating arithmetic on local 'endloc' (a nil value)

#18 Post by rock5 » Sat Nov 09, 2013 12:44 pm

Hm.. Could you have a look at what's on line 2298 of functions.lua?
  • 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

Romplayer
Posts: 120
Joined: Wed Jan 11, 2012 10:07 am

Re: Error stating arithmetic on local 'endloc' (a nil value)

#19 Post by Romplayer » Sat Nov 09, 2013 2:22 pm

Code: Select all

function getTEXT(text)
	local function memoryGetTEXT(str)
		local addressPtrsBase = memoryReadInt(getProc(), addresses.getTEXT)
		local startloc = memoryReadInt(getProc(), addressPtrsBase + 0x268)
		local endloc = memoryReadInt(getProc(), addressPtrsBase + 0x26C)
		local quarter = math.floor((endloc-startloc) / 4)

		local tmpStart = endloc
		local tmpEnd = endloc
		-- Find which quarter of memory holds string to speed up search
		for count = 1,3 do
			tmpStart = tmpStart - quarter
			local found = findPatternInProcess(getProc(), string.char(0).."Sys", "xxx", tmpStart, tmpEnd);
			local tmpText = memoryReadString(getProc(), found + 1)
			if tmpText <= str then
				startloc = tmpStart
				break
			else
				endloc = tmpStart
			end
		end
		local searchlen = endloc - startloc

		local pattern = string.char(0x00) .. str .. string.char(0x00)
		local mask = string.rep("x", #pattern)
		local offset = #pattern
		local found = findPatternInProcess(getProc(), pattern, mask, startloc, searchlen);

		if found ~= 0 then
			return memoryReadString(getProc(), found + offset)
		else
			return str
		end
	end

	if not text or type(text) ~= "string" then return end
	local resultTEXT = memoryGetTEXT(text)
	for subTEXT in string.gmatch(resultTEXT,"%[(.-)%]") do
		local translatedSubTEXT
		if tonumber(subTEXT) then -- Must be id
			translatedSubTEXT = GetIdName(tonumber(subTEXT))
		else
			translatedSubTEXT = memoryGetTEXT(subTEXT)
		end
		if translatedSubTEXT ~= nil and translatedSubTEXT ~= subTEXT then
			resultTEXT = string.gsub(resultTEXT, "%["..subTEXT.."%]", translatedSubTEXT)
		end
	end

	return resultTEXT
end
Heres the gettxt in my functions.lua I don't have a lua editor so I would have to count 2290ish or so lines so I don't know which is exactly line 2298

User avatar
Bill D Cat
Posts: 555
Joined: Sat Aug 10, 2013 8:13 pm
Location: Deep in the Heart of Texas

Re: Error stating arithmetic on local 'endloc' (a nil value)

#20 Post by Bill D Cat » Sat Nov 09, 2013 7:29 pm

Romplayer wrote:Heres the gettxt in my functions.lua I don't have a lua editor so I would have to count 2290ish or so lines so I don't know which is exactly line 2298
Edit the file in Notepad and turn on the status bar to see line numbers, or better yet, download Notepad++ and enjoy the extra features like syntax highlighting and more. http://notepad-plus-plus.org/

Post Reply

Who is online

Users browsing this forum: Google [Bot] and 11 guests