Issue with not finding MACRO button and createpath

Runes of Magic/Radiant Arcana (http://www.runesofmagic.com)
Post Reply
Message
Author
GurdyMan
Posts: 34
Joined: Fri Sep 11, 2009 5:34 pm

Issue with not finding MACRO button and createpath

#1 Post by GurdyMan » Sat Sep 12, 2009 5:39 pm

Createpath.lua: It currently doesn't add the </waypoint> tag properly.

Found the error. Missing an "hf_line .."
Should be:

Code: Select all

	elseif( v.wp_type == "WP" ) then
			hf_line = hf_line ..sprintf(wp_string, i, v.X, v.Z, 
			   p_wp_type,					-- insert type=TRAVEL for waypoints if you want
			   "");							-- no command
			   hf_line = hf_line .."</waypoint>\n";
Dummy Macro button: The checking function is really antsy. Every once in a while a script won't run and it will tell me I need to define the dummy macro. If I wait a few minutes it usually fixes itself. I haven't found any connections to be able to reproduce the error.

d003232
Posts: 1252
Joined: Wed Jun 03, 2009 4:27 pm

Re: Issue with not finding MACRO button and createpath

#2 Post by d003232 » Sat Sep 12, 2009 6:47 pm

GurdyMan wrote:Createpath.lua: It currently doesn't add the </waypoint> tag properly.

Found the error. Missing an "hf_line .."
Should be:

Code: Select all

	elseif( v.wp_type == "WP" ) then
			hf_line = hf_line ..sprintf(wp_string, i, v.X, v.Z, 
			   p_wp_type,					-- insert type=TRAVEL for waypoints if you want
			   "");							-- no command
			   hf_line = hf_line .."</waypoint>\n";
Dummy Macro button: The checking function is really antsy. Every once in a while a script won't run and it will tell me I need to define the dummy macro. If I wait a few minutes it usually fixes itself. I haven't found any connections to be able to reproduce the error.
The missing tag thing is in the last SVN. thx for your help.

In which script does the failed MACRO check occurs? bot.lua or createpath.lua? There has been a problem in the createpath lua. Depending if RoM window was in foreground or not and if there was one or two RoM windows. Should been solved in one of the last SVNs.
The RoM Bot Online Wiki needs your help!

GurdyMan
Posts: 34
Joined: Fri Sep 11, 2009 5:34 pm

Re: Issue with not finding MACRO button and createpath

#3 Post by GurdyMan » Sat Sep 12, 2009 7:42 pm

So far it's been in both. I'll make another post when it pops up again.

GurdyMan
Posts: 34
Joined: Fri Sep 11, 2009 5:34 pm

Re: Issue with not finding MACRO button and createpath

#4 Post by GurdyMan » Sat Sep 12, 2009 10:36 pm

Ok, it failed multiple times on the bot.lua script today. I did notice it never happens if the window is in the foreground. Which is annoying, but it does manage to grab the minimized window sometimes. *shrug*

Also, createpath still has a bug. My bad. See the Rom Bot thread if you haven't already.

User avatar
Administrator
Site Admin
Posts: 5307
Joined: Sat Jan 05, 2008 4:21 pm

Re: Issue with not finding MACRO button and createpath

#5 Post by Administrator » Sat Sep 12, 2009 10:58 pm

Are you up to (or past) revision 245 and still getting the macro error? I'm unable to get it to happen here. About the only thing I can think of right now is that it might be that your computer is running too slowly and the request is timing out.

Try going to line ~364 of rom/functions.lua and look for this:

Code: Select all

		if( deltaTime(getTime(), startWaitTime) > 500 ) then
Try changing the 500 to a higher value and then see if you can get the error to happen again. If it's 1000 or higher and you still receive the error, then it would be hard to believe it's simply because it isn't processing fast enough.

GurdyMan
Posts: 34
Joined: Fri Sep 11, 2009 5:34 pm

Re: Issue with not finding MACRO button and createpath

#6 Post by GurdyMan » Sat Sep 12, 2009 11:37 pm

Administrator wrote:Are you up to (or past) revision 245 and still getting the macro error? I'm unable to get it to happen here. About the only thing I can think of right now is that it might be that your computer is running too slowly and the request is timing out.

Try going to line ~364 of rom/functions.lua and look for this:

Code: Select all

		if( deltaTime(getTime(), startWaitTime) > 500 ) then
Try changing the 500 to a higher value and then see if you can get the error to happen again. If it's 1000 or higher and you still receive the error, then it would be hard to believe it's simply because it isn't processing fast enough.
I have an extremely fast computer so not sure about that. I tried it and it didn't make a difference. This time with createpath.lua I had to start it 5 times to get it to work.

User avatar
Administrator
Site Admin
Posts: 5307
Joined: Sat Jan 05, 2008 4:21 pm

Re: Issue with not finding MACRO button and createpath

#7 Post by Administrator » Sat Sep 12, 2009 11:58 pm

After it fails, check that macros text and see what it contains. What does it say?

GurdyMan
Posts: 34
Joined: Fri Sep 11, 2009 5:34 pm

Re: Issue with not finding MACRO button and createpath

#8 Post by GurdyMan » Sun Sep 13, 2009 3:47 am

Administrator wrote:After it fails, check that macros text and see what it contains. What does it say?
It returns this: â™ T Which is a Null and the number ascii 84.

Of course then the RoMScript("000"); returns 000 right after the 815 fails.

d003232
Posts: 1252
Joined: Wed Jun 03, 2009 4:27 pm

Re: Issue with not finding MACRO button and createpath

#9 Post by d003232 » Sun Sep 13, 2009 3:51 am

A good check could also be, to put a debug 'prinft' within the 'RoMScript'. Just to see, if the keybord press receive the client. There have been an issue some days before, that the RoM window don't receive the keyboar press. Just to exclude that error source a short debug would help.
The RoM Bot Online Wiki needs your help!

GurdyMan
Posts: 34
Joined: Fri Sep 11, 2009 5:34 pm

Re: Issue with not finding MACRO button and createpath

#10 Post by GurdyMan » Sun Sep 13, 2009 5:04 am

d003232 wrote:A good check could also be, to put a debug 'prinft' within the 'RoMScript'. Just to see, if the keybord press receive the client. There have been an issue some days before, that the RoM window don't receive the keyboar press. Just to exclude that error source a short debug would help.

How would I place that? I tried:

Code: Select all

	if( settings.profile.hotkeys.MACRO ) then
local rettype = 0;
 rettype =  keyboardPress(settings.profile.hotkeys.MACRO.key);
printf(sprintf("%d",rettype));
	end
Didn't work, and I don't know enough about lua to tell where the important stuff is.

User avatar
Administrator
Site Admin
Posts: 5307
Joined: Sat Jan 05, 2008 4:21 pm

Re: Issue with not finding MACRO button and createpath

#11 Post by Administrator » Sun Sep 13, 2009 7:02 am

It returns this: â™ T Which is a Null and the number ascii 84.

Of course then the RoMScript("000"); returns 000 right after the 815 fails.
Are you sure it's NULL and not TAB? The TAB character (ascii 6) will not display properly in the Macro screen. NULL wouldn't make much sense, either, because that should terminate the string.

Are you sure this is in the hotkeyed macro (this should be the one in the top-left)? Or is this the output macro (the 2nd one, directly to the right of the hotkeyed macro)?


In functions.lua, line 365, see this:

Code: Select all

		if( deltaTime(getTime(), startWaitTime) > 500 ) then
			break; -- Timed out
		end;
Try placing a printf() statement directly before the break. Something simple as "Breaking due to time-out" would be fine. Does this message display when the error occurs?

d003232
Posts: 1252
Joined: Wed Jun 03, 2009 4:27 pm

Re: Issue with not finding MACRO button and createpath

#12 Post by d003232 » Sun Sep 13, 2009 3:28 pm

You can update to the SVN 252. Then you will see a system message within the RoM Chat while the MACRO test. If you see that message, then you know that the keypress was successful submited to the client.

Theres also a printout statemant at functions.lua 366. You can just delete the comment to activate that line. So we should get some little more informations if the error occurs. Then if you have the error please check:
  • was the message 'MACRO test: send returnvalue 1234 to macro place 2' in the ingame chat?
  • see you a 'TIMEOUT in RoMScript ...' message in your MM window
  • whats the content of macro 1
  • whats the content of macro 2
  • what happens if you press your macro hotkey ingame manual
The RoM Bot Online Wiki needs your help!

GurdyMan
Posts: 34
Joined: Fri Sep 11, 2009 5:34 pm

Re: Issue with not finding MACRO button and createpath

#13 Post by GurdyMan » Sun Sep 13, 2009 9:17 pm

It did timeout at the script.

There was a 'MACRO test: send returnvalue 1234 to macro place 2' message on the ingmae chat window followed by: "Macro test: testvalue cleared"

Macro 1:

Code: Select all

/script r='' a={xxxx;SendSystemChat("MACRO test: testvalue cleared");} for i=1,#a do if a[i] then r=r..tostring(a[i]) end r=r..'	' end EditMacro(2,'',7,r);
Macro 2 was empty.

Pressing '0' results in chat window showing: "Macro test: testvalue cleared"

Can't I assume that given the contents of Macro 1 that it did actually succeed?

d003232
Posts: 1252
Joined: Wed Jun 03, 2009 4:27 pm

Re: Issue with not finding MACRO button and createpath

#14 Post by d003232 » Mon Sep 14, 2009 1:50 am

GurdyMan wrote:It did timeout at the script.

There was a 'MACRO test: send returnvalue 1234 to macro place 2' message on the ingmae chat window followed by: "Macro test: testvalue cleared"

Macro 1:

Code: Select all

/script r='' a={xxxx;SendSystemChat("MACRO test: testvalue cleared");} for i=1,#a do if a[i] then r=r..tostring(a[i]) end r=r..'	' end EditMacro(2,'',7,r);
Macro 2 was empty.

Pressing '0' results in chat window showing: "Macro test: testvalue cleared"

Can't I assume that given the contents of Macro 1 that it did actually succeed?
Yes. I you see both messages in the ingame chat and if there is NO yellow stop message in the MM window, then you pass the test successful.
The RoM Bot Online Wiki needs your help!

GurdyMan
Posts: 34
Joined: Fri Sep 11, 2009 5:34 pm

Re: Issue with not finding MACRO button and createpath

#15 Post by GurdyMan » Mon Sep 14, 2009 5:12 am

d003232 wrote:
GurdyMan wrote:It did timeout at the script.

There was a 'MACRO test: send returnvalue 1234 to macro place 2' message on the ingmae chat window followed by: "Macro test: testvalue cleared"

Macro 1:

Code: Select all

/script r='' a={xxxx;SendSystemChat("MACRO test: testvalue cleared");} for i=1,#a do if a[i] then r=r..tostring(a[i]) end r=r..'	' end EditMacro(2,'',7,r);
Macro 2 was empty.

Pressing '0' results in chat window showing: "Macro test: testvalue cleared"

Can't I assume that given the contents of Macro 1 that it did actually succeed?
Yes. I you see both messages in the ingame chat and if there is NO yellow stop message in the MM window, then you pass the test successful.

No, that was a fail.

d003232
Posts: 1252
Joined: Wed Jun 03, 2009 4:27 pm

Re: Issue with not finding MACRO button and createpath

#16 Post by d003232 » Mon Sep 14, 2009 6:20 am

GurdyMan wrote:No, that was a fail.
ok, I understand. But did you see the first message 'MACRO test: send value 1234 to macro place 2' in your ingame chat? I not I suppose the keypress did not reach your client. So be sure you have moved ingame the empty macro to the right key.
The RoM Bot Online Wiki needs your help!

GurdyMan
Posts: 34
Joined: Fri Sep 11, 2009 5:34 pm

Re: Issue with not finding MACRO button and createpath

#17 Post by GurdyMan » Mon Sep 14, 2009 3:22 pm

d003232 wrote:
GurdyMan wrote:No, that was a fail.
ok, I understand. But did you see the first message 'MACRO test: send value 1234 to macro place 2' in your ingame chat? I not I suppose the keypress did not reach your client. So be sure you have moved ingame the empty macro to the right key.
Yes I did, and the dummy macro is at 0 on the first action bar.

Since I did see this 'MACRO test: send value 1234 to macro place 2' when it failed, it's probably timing out at the second macro.

d003232
Posts: 1252
Joined: Wed Jun 03, 2009 4:27 pm

Re: Issue with not finding MACRO button and createpath

#18 Post by d003232 » Tue Sep 15, 2009 1:05 am

GurdyMan wrote:
d003232 wrote:
GurdyMan wrote:No, that was a fail.
ok, I understand. But did you see the first message 'MACRO test: send value 1234 to macro place 2' in your ingame chat? I not I suppose the keypress did not reach your client. So be sure you have moved ingame the empty macro to the right key.
Yes I did, and the dummy macro is at 0 on the first action bar.

Since I did see this 'MACRO test: send value 1234 to macro place 2' when it failed, it's probably timing out at the second macro.
If your see the first text, that means the first text was sent to the client memory AND your hotkey was successfuly pressed. So it must be the writing or reading of the returncodevalues from macro place2 that failes

Perhaps admin or droppen can say something to that? Perhaps a timing value we can increase?
The RoM Bot Online Wiki needs your help!

Post Reply

Who is online

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