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.

DLL Talk / MySQL - CattleRustler

Author
Message
XdFZero
19
Years of Service
User Offline
Joined: 24th Oct 2004
Location:
Posted: 18th Dec 2006 09:01
Hello,

Im mainly aiming for help from cattlerustler here...

Im using your DBPro TPC Mysql DLL..

My problem is, when I type any code into dbpro, it says cannot understand line,

I had put the file DBP_TPC_MySQL_EXP.dll inside my plugins-user folder, inside the compiler folder...

Also what do I do with the DBP_TPC_MySQL_KW configartion file... where does that go ?

Thank you in advance
CattleRustler
Retired Moderator
21
Years of Service
User Offline
Joined: 8th Aug 2003
Location: case modding at overclock.net
Posted: 19th Dec 2006 13:47
the ini file goes inside the editor\keywords folder, so the ide recognizes the commands and arguments.

if the files are in the correct places and dbp is saying that it cant understand a command when you try to compile it most likely means youre not using parenthesis rules correctly, based on if the method returns anything.

also be sure to call the plugin's Init function before calling any other method.

post some of your code so we can see whats wrong.

XdFZero
19
Years of Service
User Offline
Joined: 24th Oct 2004
Location:
Posted: 24th Dec 2006 20:01
Hi CatleRustler,

Thank you for your reply, however I do have a problem using your Dll...

you say I am ment to call the plugin in function, as read, I believe the command for this is as followed :

MySql_Init()

when typing that, i get the error :

Could not understand command at line 1

When typing ' MySql_Init() ' it does change to blue colour, however its still not understanding the command,

The Dll is inside the folder ' plugins-user '
The ini config is inside the folder ' editor\keywords '

Any help would be very much appercaited, and merry xmas
CattleRustler
Retired Moderator
21
Years of Service
User Offline
Joined: 8th Aug 2003
Location: case modding at overclock.net
Posted: 24th Dec 2006 22:40
Ok, the MySQL_Init method doesnt return anything so you can drop the () from that line of code. Just call it like:

MySQL_Init

thats it
A good way to know whats a function vs whats a sub (in my code) and to know when to use parenthesis in dbp is by using the document that came with the plugin. For each command I define in the document, if it ends with "...As Type" that means its a function, and your call to it needs parenthesis, regardless if there are arguments inside the parens or not.

So using the mysql_init command as an example, look at it in the documentation, it just says MySQL_INIT() <--without any "As" clause after it. This means its a Sub in my code and you wouldn't need parenthesis in your dbp code. Look at some of the other commands now, you'll see plenty of them end with "...() As Type" The commands are functions in my code and require you use parenthesis when calling them, empty if there are no args listed in the doc, or spply the args within parens if required.

Regarding the keywords, yes if they are turning blue in the code editor (Stock IDE and Blue IDE) then the keywords ini file is placed correctly.

Hopefully what I explained above helps.
Merry xmas to you too

CattleRustler
Retired Moderator
21
Years of Service
User Offline
Joined: 8th Aug 2003
Location: case modding at overclock.net
Posted: 3rd Jan 2007 17:48
XdFZero, did you ever get this sorted? Is it working?

Blue Dragon
18
Years of Service
User Offline
Joined: 21st Oct 2005
Location:
Posted: 4th Jan 2007 04:39
Well, I'm not XdFZero but I'm getting the same problem.

Code is just what I copied from another similar thread...


On compiling I get:
"Could not understand command at line 1"

.ini file is in proper place (MySQL_Init is in blue)
.dll file seems to be in proper place too.
Full path is:
C:\Program Files\The Game Creators\Dark Basic Professional Online\Compiler\plugins-user

I see many others have got this working so it's bound to be something relatively simple I figure. But darn if I can figure out what. Seems it just doesnt see the .dll and hence the MySQL_Init routine. Any suggestions welcomed!

Signatures are a waste of bytes.
Blue Dragon
18
Years of Service
User Offline
Joined: 21st Oct 2005
Location:
Posted: 4th Jan 2007 05:13
Weird. The .dll was gone! I must have checked that over 3 separate times but sure enough I just looked and the .dll wasnt there. Re-copied it and now the code works fine. Sorry for the incompentence, now off to do more coding for me!

And thanks again CR!!! - (do you get paid for these things?!)

Signatures are a waste of bytes.

Login to post a reply

Server time is: 2024-09-28 14:31:24
Your offset time is: 2024-09-28 14:31:24