Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

Dark GDK / LUA problems

Author
Message
dajack05
16
Years of Service
User Offline
Joined: 3rd Feb 2008
Location:
Posted: 23rd Nov 2009 22:34
Hello all I am working on my game and i am trying to set some variables using LUA

so far I have been using Barnski's LUA plug-ins
(they can be found here http://homepage.swissonline.ch/barnski/main.htm)

but whenever I try to use any of the LUA commands it makes my program fail



even just start the lua plug-in makes it fail

thanks in advance

Happy snoodle day
dark coder
22
Years of Service
User Offline
Joined: 6th Oct 2002
Location: Japan
Posted: 24th Nov 2009 03:03 Edited at: 24th Nov 2009 03:06
Be less specific? It crashes? It gives you an error message?

[edit] By the looks of it, the C++ library is merely the source to the DBPro plugin, you can just use lua directly.

dajack05
16
Years of Service
User Offline
Joined: 3rd Feb 2008
Location:
Posted: 24th Nov 2009 03:54
is this what you want?


i took a screen shot of the dialog that came up at the end of the compile... I attached it to this message

Happy snoodle day

Attachments

Login to view attachments
dajack05
16
Years of Service
User Offline
Joined: 3rd Feb 2008
Location:
Posted: 24th Nov 2009 03:56
also what do you mean i can just use lua directly?

Happy snoodle day
luke810
18
Years of Service
User Offline
Joined: 4th Sep 2006
Location: United States
Posted: 24th Nov 2009 05:57
You don't need a plugin or special library, you can just download lua at http://www.lua.org/download.html and use it with visual studio. But it's probably more complicated than what you are doing now despite the possible advantages.

I get that error sometimes if:

1.Project->properties->configuration->linker->input->Additional Dependancies does not contain the library

2. Project->properties->configuration->c/c++->code generation->runtime library is not set to multi-threaded (/MT)

TechLord
21
Years of Service
User Offline
Joined: 19th Dec 2002
Location: TheGameDevStore.com
Posted: 24th Nov 2009 08:03 Edited at: 24th Nov 2009 08:04
I tried to use Barnski's Plugin for DGDK Open Source Project however, I found it difficult to register functions for use within LUA Script. So, I wrote my own DarkLUA Plugin using LUA for Windows directly. You'll have to write binding code to register functions manually, its not as convenient as Barnski, but, you'll have full control.

A decent tutorial for intrgrating LUA within your Visual C++ project can be found here.

Trapped inside the DGDK Open Source Project.
dajack05
16
Years of Service
User Offline
Joined: 3rd Feb 2008
Location:
Posted: 25th Nov 2009 22:36
Ok I tried those but it didn't do anything... is there anything extra you have to do once you install LUA?

Happy snoodle day
dajack05
16
Years of Service
User Offline
Joined: 3rd Feb 2008
Location:
Posted: 27th Nov 2009 02:21 Edited at: 27th Nov 2009 03:16
i kinda fugured it out
the only problem i had was instead of putting

"lua::make()"

you do

"void lua::make()"

but now when I try

"lua::load_file("config.cfg");"

it gives me this error



PLZ REPLY SOON

Happy snoodle day
dark coder
22
Years of Service
User Offline
Joined: 6th Oct 2002
Location: Japan
Posted: 27th Nov 2009 04:31
What are you trying to do? Declaring a function isn't the same as invoking one, just use lua directly; you're trying to use a DBPro DLL which probably won't work.

Just find some pre-made VC++ binaries you can use, then you use: lua_open(), luaL_loadfile() etc, there are many tutorials online about this.

marlou
15
Years of Service
User Offline
Joined: 17th Jan 2009
Location:
Posted: 27th Nov 2009 14:01


It means that the compiler cannot find the function defined in the library. Probably because it wasnt able to link to the library.

Try adding this:


Make sure the library is added in the library directories.
As TechLord and Darkcoder says, you can use lua library directly without barnski plug-in. Its not that hard if you're an experienced programmer. If you have no background in programming whatsoever like school class and trainings, you'll find it hard. Believe me. The syntax is hard to understand for noobs. hehehe

When a person has nothing but a dream, can he dare to dream.
Outscape
16
Years of Service
User Offline
Joined: 23rd May 2008
Location:
Posted: 10th Dec 2009 01:27 Edited at: 10th Dec 2009 01:32
Quote: "As TechLord and Darkcoder says, you can use lua library directly without barnski plug-in. Its not that hard if you're an experienced programmer. If you have no background in programming whatsoever like school class and trainings, you'll find it hard. Believe me. The syntax is hard to understand for noobs. hehehe"


nvm looks too hard lol

still getting same errors as this thread



Login to post a reply

Server time is: 2024-11-20 09:32:32
Your offset time is: 2024-11-20 09:32:32