LIB.Lua Error Message

Discuss, ask for help, share ideas, give suggestions, read tutorials, and tell us about bugs you have found with MicroMacro in here.

Do not post RoM-Bot stuff here. There is a subforum for that.
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.
Post Reply
Message
Author
Red-Fang

LIB.Lua Error Message

#1 Post by Red-Fang » Mon Jan 28, 2008 4:17 am

I havent touched the lib file and have only added what has been updated on this site so here is my error (without the quotes"")

"LIB.LUA:105: Invalid data was supplied to openDC<>.

And this is the line at 105 in the lib file. (without the quotes"")

"assert( coroutine.resume(co) );"

Now mind you I have NOT changed anything in this file, so did they update the game? if so what do I replace this line with in order to have it function once again?

Thank You For your Help

Top Post for WOKF

Re: LIB.Lua Error Message

#2 Post by Top Post for WOKF » Mon Jan 28, 2008 4:19 am

I went back to edit it but didnt see a place to edit the post, I am Sorry for having to double post this

Red-Fang

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

Re: LIB.Lua Error Message

#3 Post by Administrator » Mon Jan 28, 2008 4:58 pm

I've already send you a PM concerning this on MPC.

For others that might be having the same problem, it looks as though the window title has been changed for WoKF. That is, it previously might have been something like "Kungfu Client Ver:1.0.29b", and may have had an update causing the version numbers to change. Check the window title and update this line in your scripts.

I am still working on adding wildcards to window title searching so that you can simply use "kungfu Client*" and not have to update this string. Until then, you will manually need to do this for each update.

Red-Fang

Re: LIB.Lua Error Message

#4 Post by Red-Fang » Wed Jan 30, 2008 10:55 am

You where right the client is now 1.0.31b, so I replaced it as shown below

function main()
win = findWindow("Kungfu Client Ver:1.0.31b");
hdc = openDC(win);
proc = openProcess( findProcessByExe("GongfuClient.exe") );
attach(win);

So the program now recognizes what it's supposed to do only it seems to get stuck on searching for a target, Moves the camera around and around finds a target but just keeps searching, I must say that before the last update this really worked well and me with little to no lua codeing I hope someone can post their kungfu.lua that functions

Thanks for all your help
Red-Fang

felix_fx2
Posts: 11
Joined: Fri Feb 01, 2008 9:01 pm

Re: LIB.Lua Error Message

#5 Post by felix_fx2 » Fri Feb 01, 2008 9:51 pm

i got the same problem hahas, new to this script.

edited similar ones b4. (D2jsp)

whats the resolution for this. wrong argument ?

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

Re: LIB.Lua Error Message

#6 Post by Administrator » Fri Feb 01, 2008 10:25 pm

You need to be most specific. Post your log.txt, tell me which script you are trying to run, etc. Either you are running an incompatible script (openDC() was changed, and there isn't backwards compatibility). Try getting an updated version of the script.

felix_fx2
Posts: 11
Joined: Fri Feb 01, 2008 9:01 pm

Re: LIB.Lua Error Message

#7 Post by felix_fx2 » Sat Feb 02, 2008 4:59 am

ok lets see,

i download kungfu.lua and the latest build. can't run right after downloading nor after i have configured kungfu.lua for hp potting ect...

maybe you can advise ?

here's the error code.

Code: Select all

\micromacro\lib\lib.lua:105: Invalid data was supplied to openDC().
the string at line 105,

Code: Select all

assert( coroutine.resume(co) );

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

Re: LIB.Lua Error Message

#8 Post by Administrator » Sat Feb 02, 2008 4:17 pm

Nobody is working on WoKF at this time, so the script is still kind of outdated. You need to open the script in notepad and update this section:

Code: Select all

  win = findWindow("Kungfu Client Ver:1.0.29b");
  hdc = openDC(win);
  proc = openProcess( findProcess("Kungfu Client Ver:1.0.29b") );
I believe the correct version numbers are 1.0.31, but you'll need to make sure it matches exactly the text in the window title of WoKF.

felix_fx2
Posts: 11
Joined: Fri Feb 01, 2008 9:01 pm

Re: LIB.Lua Error Message

#9 Post by felix_fx2 » Sat Feb 02, 2008 4:29 pm

win = findWindow("Kungfu Client Ver:1.0.29b");
hdc = openDC(win);
proc = openProcess( findProcess("Kungfu Client Ver:1.0.29b") );
so only to find commands to find the client window to have it do the marcos on?

btw openDC is what command. i just wanna know, i kinda like this stuff.

btw, findProcessByExe and findProcess. findProcess finds window name ? no wildcards ?

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

Re: LIB.Lua Error Message

#10 Post by Administrator » Sat Feb 02, 2008 4:48 pm

openDC documentation: http://solarimpact.servegame.com/microm ... tml#openDC

Basically, you need to open a handle to device context to the window in order to read the image from it. This is used to graphically determine if you are still fighting a monster, for example.
btw, findProcessByExe and findProcess. findProcess finds window name ? no wildcards ?
findProcessByExe() finds by process name, i.e. "game.exe"
findProcess() finds by window name, i.e. "My Game v 1.0"

Wildcards actually ARE accepted, but this is a new feature. I have just uploaded the latest update, and you can now use this feature. You will, of course, need to redownload it, though. Wildcards include ? for a single character, or * for an unspecified number of characters.

For example, you can now use:

Code: Select all

win = findWindow("Kungfu Client Ver:*");
findWindow, findProcess, and findProcessByExe all accept wildcards.

Guest

Re: LIB.Lua Error Message

#11 Post by Guest » Sat Feb 02, 2008 5:02 pm

yup i read about the documentation abit. only understand the commands barely.
findProcessByExe() finds by process name, i.e. "game.exe"
findProcess() finds by window name, i.e. "My Game v 1.0"

Wildcards actually ARE accepted, but this is a new feature. I have just uploaded the latest update, and you can now use this feature. You will, of course, need to redownload it, though. Wildcards include ? for a single character, or * for an unspecified number of characters.
Thank a bunch, you told me what i needed to know.

P.S: Your Hosting the fourm ?

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

Re: LIB.Lua Error Message

#12 Post by Administrator » Sat Feb 02, 2008 5:40 pm

Yes, for now. I hope it runs...acceptably.

I'm working on setting up a separate server, going through some legal garbage, and trying to setup a Source Forge page, so there's a lot of stuff to come.

felix_fx2
Posts: 11
Joined: Fri Feb 01, 2008 9:01 pm

Re: LIB.Lua Error Message

#13 Post by felix_fx2 » Sat Feb 02, 2008 5:50 pm

Nice. it felt the same as when i access my home FTP. imo at work now. can't do the actual test but i noticed that when i ran other lua scripts they dun have this error.

vb fourms are really popular nowdays and can handle serious loads. you should go for that. this one is php right. i am a never touched fourm setup before so i might be wrong

edit* i am back at home now and it works. ty for being patient.

now to further configure it. if i have done a gd configuration for the other class i'll post

User avatar
3cmSailorfuku
Posts: 354
Joined: Mon Jan 21, 2008 6:25 pm

Re: LIB.Lua Error Message

#14 Post by 3cmSailorfuku » Sun Feb 03, 2008 9:47 am

felix_fx2 wrote:Nice. it felt the same as when i access my home FTP. imo at work now. can't do the actual test but i noticed that when i ran other lua scripts they dun have this error.

vb fourms are really popular nowdays and can handle serious loads. you should go for that. this one is php right. i am a never touched fourm setup before so i might be wrong

edit* i am back at home now and it works. ty for being patient.

now to further configure it. if i have done a gd configuration for the other class i'll post
vbulletin costs money, and we don't want to setup a illegal forum do we? ;)
But first there has to be a hardware upgrade instead a software one, eg. using a dedicated/host server with a good connection.

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

Re: LIB.Lua Error Message

#15 Post by Administrator » Sun Feb 03, 2008 2:35 pm

I'm looking at using Hostgator. I'm quite familiar with them as it is, and they have decent prices for what they offer, really. Maybe once my check comes in I'll buy up a year subscription.

felix_fx2
Posts: 11
Joined: Fri Feb 01, 2008 9:01 pm

Re: LIB.Lua Error Message

#16 Post by felix_fx2 » Mon Feb 04, 2008 4:53 pm

3cmSailorfuku wrote:
felix_fx2 wrote:Nice. it felt the same as when i access my home FTP. imo at work now. can't do the actual test but i noticed that when i ran other lua scripts they dun have this error.

vb fourms are really popular nowdays and can handle serious loads. you should go for that. this one is php right. i am a never touched fourm setup before so i might be wrong

edit* i am back at home now and it works. ty for being patient.

now to further configure it. if i have done a gd configuration for the other class i'll post
vbulletin costs money, and we don't want to setup a illegal forum do we? ;)
But first there has to be a hardware upgrade instead a software one, eg. using a dedicated/host server with a good connection.
i though he was sayin going through legal stuff ? ( i though money matters)
me bad sorry.

Post Reply

Who is online

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