Page 1 of 1

LIB.Lua Error Message

Posted: Mon Jan 28, 2008 4:17 am
by Red-Fang
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

Re: LIB.Lua Error Message

Posted: Mon Jan 28, 2008 4:19 am
by Top Post for WOKF
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

Re: LIB.Lua Error Message

Posted: Mon Jan 28, 2008 4:58 pm
by Administrator
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.

Re: LIB.Lua Error Message

Posted: Wed Jan 30, 2008 10:55 am
by Red-Fang
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

Re: LIB.Lua Error Message

Posted: Fri Feb 01, 2008 9:51 pm
by felix_fx2
i got the same problem hahas, new to this script.

edited similar ones b4. (D2jsp)

whats the resolution for this. wrong argument ?

Re: LIB.Lua Error Message

Posted: Fri Feb 01, 2008 10:25 pm
by Administrator
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.

Re: LIB.Lua Error Message

Posted: Sat Feb 02, 2008 4:59 am
by felix_fx2
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) );

Re: LIB.Lua Error Message

Posted: Sat Feb 02, 2008 4:17 pm
by Administrator
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.

Re: LIB.Lua Error Message

Posted: Sat Feb 02, 2008 4:29 pm
by felix_fx2
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 ?

Re: LIB.Lua Error Message

Posted: Sat Feb 02, 2008 4:48 pm
by Administrator
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.

Re: LIB.Lua Error Message

Posted: Sat Feb 02, 2008 5:02 pm
by Guest
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 ?

Re: LIB.Lua Error Message

Posted: Sat Feb 02, 2008 5:40 pm
by Administrator
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.

Re: LIB.Lua Error Message

Posted: Sat Feb 02, 2008 5:50 pm
by felix_fx2
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

Re: LIB.Lua Error Message

Posted: Sun Feb 03, 2008 9:47 am
by 3cmSailorfuku
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.

Re: LIB.Lua Error Message

Posted: Sun Feb 03, 2008 2:35 pm
by Administrator
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.

Re: LIB.Lua Error Message

Posted: Mon Feb 04, 2008 4:53 pm
by felix_fx2
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.