Help Please MM2 >> RomBot2
Forum rules
This is a sub-forum for things specific to MicroMacro.
This is not the place to ask questions about the RoM bot, which uses MicroMacro. There is a difference.
This is a sub-forum for things specific to MicroMacro.
This is not the place to ask questions about the RoM bot, which uses MicroMacro. There is a difference.
- Administrator
- Site Admin
- Posts: 5312
- Joined: Sat Jan 05, 2008 4:21 pm
Re: Help Please MM2 >> RomBot2
Change it to return true instead of just return.
- Lamkefyned
- Posts: 348
- Joined: Thu May 23, 2013 11:38 am
- Location: Spain
Re: Help Please MM2 >> RomBot2
not detected error
Code: Select all
local running = true;
function macro.main(dt)
if( not running )
return true;
-- other code here.
end
function macro.event(e, data1, data2, data3)
if( e == "keypressed" ) then
if( not running and data1 == key.VK_F5 ) then
start();
end
if( running and data1 == key.VK_F6 ) then
pause();
end
end
end
function start()
print("Started. Press F6 to pause.");
end
function pause()
print("Paused. Press F5 to continue.");
end
Code: Select all
2014-09-10 01:21:20 : MicroMacro version 1.9.18.260 (Alpha)
2014-09-10 01:21:20 : Intel(R) Core(TM) i7-4770K CPU @ 3.50GHz @2500MHz, Windows 7
2014-09-10 01:21:20 : User privilege: Administrator
-------------------------------------------------------------------------------
2014-09-10 01:26:55 : Load file error code: 7 (Runtime error)
bot.lua:40: functions.lua:2833: 'end' expected (to close 'function' at line 340) near <eof>
If you think something is right just because everyone else believes,you're not thinking.
- Administrator
- Site Admin
- Posts: 5312
- Joined: Sat Jan 05, 2008 4:21 pm
Re: Help Please MM2 >> RomBot2
This:
Needs to be changed to:
Code: Select all
if( not running )
return true;
Code: Select all
if( not running ) then
return true;
end
- Lamkefyned
- Posts: 348
- Joined: Thu May 23, 2013 11:38 am
- Location: Spain
Re: Help Please MM2 >> RomBot2
bug fixed tomorrow but are now 3 o'clock in the morning and have to sleep
If you think something is right just because everyone else believes,you're not thinking.
Re: Help Please MM2 >> RomBot2
you are missing an end
needs to be
Code: Select all
function macro.main(dt)
if( not running )
return true;
-- other code here.
end
Code: Select all
function macro.main(dt)
if( not running )
return true;
end
-- other code here.
end
Remember no matter you do in life to always have a little fun while you are at it
wiki here http://www.solarstrike.net/wiki/index.php?title=Manual
wiki here http://www.solarstrike.net/wiki/index.php?title=Manual
- Lamkefyned
- Posts: 348
- Joined: Thu May 23, 2013 11:38 am
- Location: Spain
Re: Help Please MM2 >> RomBot2
I am very grateful to all. Thanks a lot
and for this and the next the same?
Code: Select all
function exitCallback()
releaseKeys();
end
atExit(exitCallback);
Code: Select all
function errorCallback(script, line, message)
local crashed, pid = isClientCrashed()
if crashed then
printf("Attached game client has crashed. Killing client (PID %d)\n", pid);
warning(script .. ":" .. line .. ": " .. message);
os.execute("TASKKILL /PID " .. pid .. " /F");
else
releaseKeys();
printf("The game client did not crash.\n");
end
end
atError(errorCallback);
If you think something is right just because everyone else believes,you're not thinking.
Who is online
Users browsing this forum: No registered users and 14 guests