Page 1 of 1
Issue with not finding MACRO button and createpath
Posted: Sat Sep 12, 2009 5:39 pm
by GurdyMan
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.
Re: Issue with not finding MACRO button and createpath
Posted: Sat Sep 12, 2009 6:47 pm
by d003232
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.
Re: Issue with not finding MACRO button and createpath
Posted: Sat Sep 12, 2009 7:42 pm
by GurdyMan
So far it's been in both. I'll make another post when it pops up again.
Re: Issue with not finding MACRO button and createpath
Posted: Sat Sep 12, 2009 10:36 pm
by GurdyMan
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.
Re: Issue with not finding MACRO button and createpath
Posted: Sat Sep 12, 2009 10:58 pm
by Administrator
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.
Re: Issue with not finding MACRO button and createpath
Posted: Sat Sep 12, 2009 11:37 pm
by GurdyMan
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.
Re: Issue with not finding MACRO button and createpath
Posted: Sat Sep 12, 2009 11:58 pm
by Administrator
After it fails, check that macros text and see what it contains. What does it say?
Re: Issue with not finding MACRO button and createpath
Posted: Sun Sep 13, 2009 3:47 am
by GurdyMan
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.
Re: Issue with not finding MACRO button and createpath
Posted: Sun Sep 13, 2009 3:51 am
by d003232
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.
Re: Issue with not finding MACRO button and createpath
Posted: Sun Sep 13, 2009 5:04 am
by GurdyMan
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.
Re: Issue with not finding MACRO button and createpath
Posted: Sun Sep 13, 2009 7:02 am
by Administrator
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?
Re: Issue with not finding MACRO button and createpath
Posted: Sun Sep 13, 2009 3:28 pm
by d003232
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
Re: Issue with not finding MACRO button and createpath
Posted: Sun Sep 13, 2009 9:17 pm
by GurdyMan
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?
Re: Issue with not finding MACRO button and createpath
Posted: Mon Sep 14, 2009 1:50 am
by d003232
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.
Re: Issue with not finding MACRO button and createpath
Posted: Mon Sep 14, 2009 5:12 am
by GurdyMan
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.
Re: Issue with not finding MACRO button and createpath
Posted: Mon Sep 14, 2009 6:20 am
by d003232
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.
Re: Issue with not finding MACRO button and createpath
Posted: Mon Sep 14, 2009 3:22 pm
by GurdyMan
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.
Re: Issue with not finding MACRO button and createpath
Posted: Tue Sep 15, 2009 1:05 am
by d003232
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?