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.

DarkBASIC Professional Discussion / Rpg/ Scripting Questions...

Author
Message
Dark Dragon
19
Years of Service
User Offline
Joined: 22nd Jun 2007
Location: In the ring, Kickin\' *donkeybutt*.
Posted: 27th May 2010 03:46
Hey,

DD here. I wish to ask a couple questions.

1): Is it possible to execute a .dba file from a DbPro program? As in, lets say I have a prog called prog.exe, and a dba file called "mycommands.dba". Is it possible to have :



It is my understanding that the Execute File command will open only executables..... and the help file says:

Quote: "
"Passing a document, rather than an executable as the filename will cause the document to be opened." "




and 2): This method would be somthing like scripting for DBpro.....But I also have a Lua Plugin for scripting......But when I try to run my scripts(They run in a Lua compiler...) they crash. Why?





@Nerd in Training
Just in case you are wondering, i'll post my stuff() on your thread......i'll edit, because there is no need for me to post my code here now....

Brendy boy
21
Years of Service
User Offline
Joined: 17th Jul 2005
Location: Croatia
Posted: 27th May 2010 03:57
Quote: "Is it possible to execute a .dba file from a DbPro program?"

No

Quote: ".But I also have a Lua Plugin for scripting......But when I try to run my scripts(They run in a Lua compiler...) they crash. Why?"

They obviously have errors. Post them here and someone will help you find them.

"After you finish the first 90% of a project, you have to finish the other 90%." - Michael Abrash
Dark Dragon
19
Years of Service
User Offline
Joined: 22nd Jun 2007
Location: In the ring, Kickin\' *donkeybutt*.
Posted: 27th May 2010 04:15
k.......here's the script. Remember that there's no Media being loaded here, just vars and arrays being declared.






Thats all I wanna declare for now(using lua at least)........


Quote: "Quote: "Is it possible to execute a .dba file from a DbPro program?"
No"



Really? That kinnda sucks. Big time.....

Brendy boy
21
Years of Service
User Offline
Joined: 17th Jul 2005
Location: Croatia
Posted: 27th May 2010 04:33 Edited at: 27th May 2010 04:34
Have you tried commenting each line in the script to find out which line causes the problem? Which lua plugin do you use? (there are 3 of them)

"After you finish the first 90% of a project, you have to finish the other 90%." - Michael Abrash
Dark Dragon
19
Years of Service
User Offline
Joined: 22nd Jun 2007
Location: In the ring, Kickin\' *donkeybutt*.
Posted: 27th May 2010 04:44 Edited at: 27th May 2010 04:45
I'm using Barnski's Free Lua Plugin.

Quote: "Have you tried commenting each line in the script to find out which line causes the problem?"


And Yes,I've tried this in my Lua compiler and in DB.....to no avail....Although its just some variables......

luskos
19
Years of Service
User Offline
Joined: 28th Jun 2007
Location:
Posted: 27th May 2010 09:00
I`m not familiar with Lua at all but is it possible to have some error like wrong name of some variable like this one:


Which lack a letter in the end, "t".It may be on purpose but i noticed that "Select" is written right.If it`s just that simple using few variables it must be wrong names or wrong setup.

Where there is a will, there is a way.
I often edit my posts, that`s who i am
Mobiius
Valued Member
23
Years of Service
User Offline
Joined: 27th Feb 2003
Location: The Cold North
Posted: 27th May 2010 09:12
Quote: "Really? That kinnda sucks. Big time....."

Not really, DBPro is a compiled language, of course a source file won't wont work because it hasn't been compiled into the EXE or linked with the libraries.

As for your LUA, have you tried any example programs which came with the plgin? (I'm sure there's at least one) That'll let you know if the error's with your code, or the plugin itself.

My signature is NOT a moderator plaything! Stop changing it!
Brendy boy
21
Years of Service
User Offline
Joined: 17th Jul 2005
Location: Croatia
Posted: 27th May 2010 23:19
I tried to run the script, it works without crashing. What code do you use for running the script?

"After you finish the first 90% of a project, you have to finish the other 90%." - Michael Abrash
Dark Dragon
19
Years of Service
User Offline
Joined: 22nd Jun 2007
Location: In the ring, Kickin\' *donkeybutt*.
Posted: 28th May 2010 03:47
Quote: " What code do you use for running the script?"






...........Is what i Was doing,


but, this thread can just about die, I've figured out how to accomplish what I need using Just DB code, no Lua........

Thanks for your help tho, I do appreciate it....!

Login to post a reply

Server time is: 2026-07-25 17:48:02
Your offset time is: 2026-07-25 17:48:02