Error with getpos ?
Error with getpos ?
Hey bros,
I'm trying to get my in-game coordinates so I can setup some waypoints, but every time I enter the command rom\getpos to run the get position script I get this error:
I ran the update script and updated the SVN just in case; that didn't solve it either. I guess for some reason 'database' hasn't been initialized by this line (695):
local tmp = database.utf8_ascii[_key];
I searched the forums and the wiki and wasn't able to find any solutions or similar problems.
I also tried setting the ROMDATA_PATH to my RoM installation path (C:\Program Files\Runes of Magic) and it didn't help.
I wish people actually used IRC for this haha, I logged on only to be greeted by ChanServ T_T.
Any and all help would be appreciated!
Thanks
I'm trying to get my in-game coordinates so I can setup some waypoints, but every time I enter the command rom\getpos to run the get position script I get this error:
I ran the update script and updated the SVN just in case; that didn't solve it either. I guess for some reason 'database' hasn't been initialized by this line (695):
local tmp = database.utf8_ascii[_key];
I searched the forums and the wiki and wasn't able to find any solutions or similar problems.
I also tried setting the ROMDATA_PATH to my RoM installation path (C:\Program Files\Runes of Magic) and it didn't help.
I wish people actually used IRC for this haha, I logged on only to be greeted by ChanServ T_T.
Any and all help would be appreciated!
Thanks
- Administrator
- Site Admin
- Posts: 5313
- Joined: Sat Jan 05, 2008 4:21 pm
Re: Error with getpos ?
Open up getpos.lua in notepad. You'll see this line near the top:
Directly above that, add this:
Save it. Let me know if this works.
Code: Select all
include("functions.lua");
Code: Select all
include("database.lua");
Re: Error with getpos ?
Ah sorry I forgot to mention I tried that.
This is the error I get when I add the include (which I also added to the functions.lua file):
This is the function that is crashing, the specific line (698) is in bold:
Thanks for the reply by the way. Is there any way I can contact you over an instant messenger (whatever works for you) by chance? Would love to get this figured out asap.
This is the error I get when I add the include (which I also added to the functions.lua file):
This is the function that is crashing, the specific line (698) is in bold:
Pretty weird, because that would mean database is no longer null, but the utf8_ascii array is? Heh, sorry my LUA is pretty rustyfunction utf8ToAscii_umlauts(_str)
-- convert one UTF8 character to his ASCII code
-- key is the combined UTF8 code
local function replaceUtf8( _str, _key )
local tmp = database.utf8_ascii[_key];
_str = string.gsub(_str, string.char(tmp.utf8_1, tmp.utf8_2), string.char(tmp.ascii) );
return _str
end
_str = replaceUtf8(_str, 195164); -- ä
_str = replaceUtf8(_str, 195132); -- Ä
_str = replaceUtf8(_str, 195182); -- ö
_str = replaceUtf8(_str, 195150); -- Ö
_str = replaceUtf8(_str, 195188); -- ü
_str = replaceUtf8(_str, 195156); -- Ü
_str = replaceUtf8(_str, 195159); -- ß
return _str;
end
Thanks for the reply by the way. Is there any way I can contact you over an instant messenger (whatever works for you) by chance? Would love to get this figured out asap.
- Administrator
- Site Admin
- Posts: 5313
- Joined: Sat Jan 05, 2008 4:21 pm
Re: Error with getpos ?
Try adding this to the function:
Does the bot work normally for you? You could just use the position given in the titlebar.
Code: Select all
if( not tmp ) then
error("Invalid database information passed to replaceUtf8()", 2);
end
Re: Error with getpos ?
I can just use the CreatePath script to get coordinates without any issues - I don't know why I was using getpos in the first place.
If you still want me to test that code for the sake of fixing it just let me know, otherwise I'm going to move on.
Thanks for the replies by the way, pretty cool to see you providing support for your (fantastic/very well done/impressive etc) project to anyone who stumbles in
I still really believe that an IRC channel is the way to go. So much more ideal for getting help and talking to fellow users.
If you still want me to test that code for the sake of fixing it just let me know, otherwise I'm going to move on.
Thanks for the replies by the way, pretty cool to see you providing support for your (fantastic/very well done/impressive etc) project to anyone who stumbles in
I still really believe that an IRC channel is the way to go. So much more ideal for getting help and talking to fellow users.
- Administrator
- Site Admin
- Posts: 5313
- Joined: Sat Jan 05, 2008 4:21 pm
Re: Error with getpos ?
No worries. I'll debug it when I get around to it. As long as you got something that works, that's good enough.
-
- Posts: 33
- Joined: Fri Jan 22, 2010 1:23 am
Re: Error with getpos ?
I get the same error and I was wondering if this option existed. Could we make an injections script within the createpath.lua script that added a waypoint after a designated waypoint (this would also autocorrect the comment numbering).
option 7 (or next up I forget what it is), edit existing file
enter filename
mark waypoint
which waypoint would you like to place this waypoint after?
use code to insert
correct comments
have beer and pretzels
watch bot work
etc...
option 7 (or next up I forget what it is), edit existing file
enter filename
mark waypoint
which waypoint would you like to place this waypoint after?
use code to insert
correct comments
have beer and pretzels
watch bot work
etc...
Re: Error with getpos ?
This might actually be useful. If I find the time I'll look into implementing this, shouldn't be too difficult.InadequateCoder wrote:I get the same error and I was wondering if this option existed. Could we make an injections script within the createpath.lua script that added a waypoint after a designated waypoint (this would also autocorrect the comment numbering).
option 7 (or next up I forget what it is), edit existing file
enter filename
mark waypoint
which waypoint would you like to place this waypoint after?
use code to insert
correct comments
have beer and pretzels
watch bot work
etc...
Who is online
Users browsing this forum: No registered users and 0 guests