Page 1 of 1

Error "attempt to get length of local "Key" (a nil value)

Posted: Tue Jul 04, 2023 11:40 am
by Mausmann
Heya
did anyone have the same problem or know how to fix this i cant find a way to do it cause i dont even know what the problem is?

Re: Error "attempt to get length of local "Key" (a nil value)

Posted: Wed Jul 05, 2023 6:56 am
by Administrator
Please provide more information. Copy and paste the full error (you can get this from the
log.txt
file in the same folder as
micromacro.exe
.
Also an explanation of what you were trying to do with the bot, and what it was doing when it crashed with that error, would help in debugging.

Re: Error "attempt to get length of local "Key" (a nil value)

Posted: Wed Jul 05, 2023 11:06 am
by Mausmann
so theres a screenshot for you now of the full log file and also the command error

Also the bot crashes as soon as i choose the character

If you dont have any ideas for the fix i would like to ask you if you have a working bot and potentially send it to me?

Thank you in advance for your time

Re: Error "attempt to get length of local "Key" (a nil value)

Posted: Thu Jul 06, 2023 7:10 am
by Administrator
A few minor things I noticed, but may not be causing the issue you're having:
- Your game version shows as 7.4.0.2985; the latest version (from Gameforge) is 7.4.0.2987 -- are you playing on a different client?
- Line 2600 of
functions.lua
does not contain the variable that is indicated in your error message - this indicates that your scripts might have been modified at some point, or just using an older version.

As for the error included in your
log.txt
, it looks like it is failing to read the cache version from the file. In the
rom-bot
folder, go to
cache
and then delete
texts.lua
. Try running the bot now; does that help?
If that does not help, I would recommend running the
rombot_updater.exe
from the
rom-bot
folder -- this will forcefully update your scripts to the latest version.

Re: Error "attempt to get length of local "Key" (a nil value)

Posted: Fri Jul 07, 2023 12:08 pm
by Mausmann
it didnt work so i installed a fresh version and now the bot activates on the character i also created a "Profile" with the exact Characters Name start the waypoint mode and mark the path but when i start the path it tells me this
2023-07-07 19:04:42 - ...wender\Desktop\micromacro\scripts\rom-bot-master\bot.lua:750: bad argument #1 to 'lower' (string expected, got boolean)

I cant figure out what it means any ideas?

Re: Error "attempt to get length of local "Key" (a nil value)

Posted: Sat Jul 08, 2023 8:25 am
by Administrator
In your profile, find the option for
RELOAD_AMMUNITION
. I'm guessing you set it to
true
(since I was able to reproduce the error with that). Ensure that the value is either
false
,
arrow
, or
thrown
enclosed in quotes, like this:

Code: Select all

<option name="RELOAD_AMMUNITION" 	value="false" />

Next - do you have anything in your profile or waypoints that would modify the value of RELOAD_AMMUNITION?

Re: Error "attempt to get length of local "Key" (a nil value)

Posted: Sat Jul 08, 2023 10:47 am
by Mausmann
yea i changed it to false and now its working again finally thank you you saved me :D