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 / PurePlugin Procedures

Author
Message
dononeton
19
Years of Service
User Offline
Joined: 12th Jun 2004
Location: Tusaloosa, AL : USA
Posted: 15th Apr 2007 17:54

I keep getting 3 for the return. What I want this procedure to do is return the number that makes DBGetObjectExist(object.l) return 0

In DBPro I say


I want to do is


AMD Athlon 64 x2 Dual Core Processor 3800+,MMX 3DNOW (2CPUs)
1024 MB RAM
GeForce 7300 GT 512 MB
Freddix
AGK Developer
21
Years of Service
User Offline
Joined: 19th Sep 2002
Location: France
Posted: 15th Apr 2007 18:23
in what you want to make, A and B will return the same value.
You may, under DBPro do this :



Inside your PurePLUGIN's TPC Plugin, do this :

You do not need to open DarkBASIC Professional's DLL from your TPC, PurePLUGIN do the job for you
You only have to use DarkBASIC Professional wrapped commands

This sample may work correctly

Gandalf said: "All we have to decide is what to do with the time that is given to us"
Odyssey-Creators - X-Quad Editor - 3DMapEditor
dononeton
19
Years of Service
User Offline
Joined: 12th Jun 2004
Location: Tusaloosa, AL : USA
Posted: 15th Apr 2007 22:29 Edited at: 15th Apr 2007 22:49
@Freddix
Oh crap. I was calling my commands one after each other no wander it was returning the same thing no objects was existing when they were being called. My command works now thanks for pointing that out.

Ok so pureplugin does the opening of the dll I am trying to use.

Just tried it and it worked fine


Man you made this easy

AMD Athlon 64 x2 Dual Core Processor 3800+,MMX 3DNOW (2CPUs)
1024 MB RAM
GeForce 7300 GT 512 MB
Freddix
AGK Developer
21
Years of Service
User Offline
Joined: 19th Sep 2002
Location: France
Posted: 16th Apr 2007 00:26
Happy to hear that :p

Gandalf said: "All we have to decide is what to do with the time that is given to us"
Odyssey-Creators - X-Quad Editor - 3DMapEditor
dononeton
19
Years of Service
User Offline
Joined: 12th Jun 2004
Location: Tusaloosa, AL : USA
Posted: 20th Apr 2007 04:20 Edited at: 20th Apr 2007 04:22


Ok thats simple. I want it to load an object that part works fine if I remove

What I want is for it to load my model assign it an object number then set it up for sparkys collision. Easy huh? But its not working. You may be wandering why I want to do something easy like this. Its not done I have a function that reads the dbo file for limbs. Limbs 1,2,3 are for LOD and Limb 4 is a collision model. So I am just laying out some test code and fill in the blanks later. I must be doing something wrong in the wrapped version of SC_setupObject

AMD Athlon 64 x2 Dual Core Processor 3800+,MMX 3DNOW (2CPUs)
1024 MB RAM
GeForce 7300 GT 512 MB
Freddix
AGK Developer
21
Years of Service
User Offline
Joined: 19th Sep 2002
Location: France
Posted: 20th Apr 2007 14:02
if you have DLL dependencies (and SC_SetupObject create a dependency with Sparky's DLL)
you must be sure that somewhere in your DarkBASIC Professional source code, it exist at least 1 command from the Sparky's DLL. This will force compiler to include the SparkyDLL in the .EXE and then PurePLUGIN Plugins will be able to use it.

In generic terms.
If Your PlugIN X use another plugin Y You must be sure to have at least 1 command from the plugin Y in your DarkBASIC Professional source code to force compiler to include the Plugin Y in the compiled .EXE

Gandalf said: "All we have to decide is what to do with the time that is given to us"
Odyssey-Creators - X-Quad Editor - 3DMapEditor
dononeton
19
Years of Service
User Offline
Joined: 12th Jun 2004
Location: Tusaloosa, AL : USA
Posted: 21st Apr 2007 03:46 Edited at: 21st Apr 2007 04:28
Thanks Freddix. You solve one of the problem. I had to do this to get it to work


My command is


The second parameter is the name I give the object. FreeObject() gets an unused object number. In LoadStaticObject() has a parameter ObjectName in which is equal to whatever FreeObject() comes up with.
What I want to do is make and object give it a name so it can be used by other commands


In above create2 is equal to 0 in the postion object command.Is there a way to get the numeric value from create2 so I can pass it from cammand to command?

AMD Athlon 64 x2 Dual Core Processor 3800+,MMX 3DNOW (2CPUs)
1024 MB RAM
GeForce 7300 GT 512 MB
Freddix
AGK Developer
21
Years of Service
User Offline
Joined: 19th Sep 2002
Location: France
Posted: 21st Apr 2007 12:37
What you'll have to do is to create a dim .s value in PureBASIC to store the objects names.

That may produce something like this :


If you want to do a function to retrieve the ID of the named object, do something like this :
(it's not optimized but it may work )


Gandalf said: "All we have to decide is what to do with the time that is given to us"
Odyssey-Creators - X-Quad Editor - 3DMapEditor

Login to post a reply

Server time is: 2024-05-20 15:44:19
Your offset time is: 2024-05-20 15:44:19