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.

Work in Progress / my first PurePlugin .dll and .ini - DufferPlugin

Author
Message
Duffer
21
Years of Service
User Offline
Joined: 9th Feb 2003
Location: chair
Posted: 20th Jun 2007 23:11 Edited at: 24th Jun 2007 16:53
[edit] more or less working version of plugin - first ini file then dll file now posted below - 25/6/07

here is the ini file so you can see some of the currently supported commands - as you can see I havnt finished the ini file and no way will I be able to do supporting help html...

basically a few hopefully useful text and system commands and a hell of a lot of image/bitmap commands...

a long time dabbler with DBC and DBPro with no actual talent but lots of enthusiasm...

Attachments

Login to view attachments
Duffer
21
Years of Service
User Offline
Joined: 9th Feb 2003
Location: chair
Posted: 20th Jun 2007 23:13 Edited at: 24th Jun 2007 16:53
and here is the finished .dll

the dll needs to go in the plugins-user directory and the .ini file needs to go in the help/keywords directory...

now working on seamless texture commands and (hopefully) more drawing to image commands and (very hopefully) some fractal terrain/heightmap commands...

it is still only alpha ie. fresh and untested

a long time dabbler with DBC and DBPro with no actual talent but lots of enthusiasm...

Attachments

Login to view attachments
Freddix
AGK Developer
22
Years of Service
User Offline
Joined: 19th Sep 2002
Location: France
Posted: 20th Jun 2007 23:43 Edited at: 20th Jun 2007 23:46
nice

contain lots of new commands

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
Humanoid
21
Years of Service
User Offline
Joined: 20th Sep 2003
Location: Finland
Posted: 21st Jun 2007 00:19
argh, everytime download something new dll and ini file missing

Suomi Finland PERKELE!
<AMD athlon 64 3000+> <Asus A8N-E nForce4 ultra> <GF6600LE PCI-E> <1GB ram>
Duffer
21
Years of Service
User Offline
Joined: 9th Feb 2003
Location: chair
Posted: 21st Jun 2007 00:30 Edited at: 21st Jun 2007 09:36
[edit] @Freddix, it isnt working with DBPro - have sent you an email with all relevant files... HELP! - see also the post in Program Announcements... also, are my user name and user code correct in my pb master file? they are the ones I was given when first purchased pureplugin?

a long time dabbler with DBC and DBPro with no actual talent but lots of enthusiasm...
Freddix
AGK Developer
22
Years of Service
User Offline
Joined: 19th Sep 2002
Location: France
Posted: 21st Jun 2007 14:54
I've released PurePLUGIN 1.4 and I tried to compile your plugin with PureBASIC 4.10b2 + PurePLUGIN 1.4 and commands I tried did work.
Send me a sample that reproduct the problem.
Don't forget that you must include "Null = PP Initialized()" at the beginning of your code to force Compiler to include PurePLUGIN.DLL

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
Duffer
21
Years of Service
User Offline
Joined: 9th Feb 2003
Location: chair
Posted: 21st Jun 2007 18:12 Edited at: 21st Jun 2007 18:16
@ Freddix - Doh! Think I see my error now - will get back to you shortly...

now I include the NULL command I avoid the first error message but still get the second - see attached

a long time dabbler with DBC and DBPro with no actual talent but lots of enthusiasm...

Attachments

Login to view attachments
Duffer
21
Years of Service
User Offline
Joined: 9th Feb 2003
Location: chair
Posted: 21st Jun 2007 18:17
and see the attached wih the second error message

a long time dabbler with DBC and DBPro with no actual talent but lots of enthusiasm...

Attachments

Login to view attachments
Freddix
AGK Developer
22
Years of Service
User Offline
Joined: 19th Sep 2002
Location: France
Posted: 21st Jun 2007 21:13
yes but you did forgot the "Compiler Includes".
When you use a commands from another DLL, the compiler don't know that you did use it. You must tell it that you use these DLLs by adding 1 command from each of these DLLs in your source code.
Otherwise, your plugin will search in memory a function that was not loaded and then ... crash !

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
Duffer
21
Years of Service
User Offline
Joined: 9th Feb 2003
Location: chair
Posted: 21st Jun 2007 22:29
@ Freddix - done all of that - and my plugin commands are now mostly working - but the df get home dir() type commands generate 4 characters of gibberish before giving the rest of the string of the correct directory... any ideas?

a long time dabbler with DBC and DBPro with no actual talent but lots of enthusiasm...
Freddix
AGK Developer
22
Years of Service
User Offline
Joined: 19th Sep 2002
Location: France
Posted: 22nd Jun 2007 01:45 Edited at: 22nd Jun 2007 01:48
yes because there is a specific way to return string. It work the same way you receive string.

When you want to send a string back to DBPro, you must tell him to allocate string len + 1 bytes, copy you string in and return the pointer to the string.
It gives this result :



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
Duffer
21
Years of Service
User Offline
Joined: 9th Feb 2003
Location: chair
Posted: 22nd Jun 2007 01:49
@ Freddix - I see. I'll need to make some serious revisions to the plugin but this makes sense - thank you for answering all the questions...

a long time dabbler with DBC and DBPro with no actual talent but lots of enthusiasm...
Freddix
AGK Developer
22
Years of Service
User Offline
Joined: 19th Sep 2002
Location: France
Posted: 22nd Jun 2007 02:38
np

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
Freddix
AGK Developer
22
Years of Service
User Offline
Joined: 19th Sep 2002
Location: France
Posted: 22nd Jun 2007 02:39
If you don't want to copy this several times, simply create a MACRO
A special ProcedureReturnString Macro for example :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
Duffer
21
Years of Service
User Offline
Joined: 9th Feb 2003
Location: chair
Posted: 23rd Jun 2007 08:30 Edited at: 23rd Jun 2007 08:42
@ Freddix - keeping it simple, can you see anything wrong with this bit of purebasic code:-



[edit] Doh! I spotted it - you missed a "\" in the "*GlobPtrCreateDeleteString" you sent me in your code clip above and email - of course it should be "*GlobPtr\CreateDeleteString". will try it again now...

a long time dabbler with DBC and DBPro with no actual talent but lots of enthusiasm...
Freddix
AGK Developer
22
Years of Service
User Offline
Joined: 19th Sep 2002
Location: France
Posted: 23rd Jun 2007 10:43
yes it's *GlobPtr\CreateDeleteString

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
Duffer
21
Years of Service
User Offline
Joined: 9th Feb 2003
Location: chair
Posted: 24th Jun 2007 16:52
new version of ini (for help/keywords) and dll (for plugins-user) are posted at the start of this thread now (25/6/07)

a long time dabbler with DBC and DBPro with no actual talent but lots of enthusiasm...
Freddix
AGK Developer
22
Years of Service
User Offline
Joined: 19th Sep 2002
Location: France
Posted: 24th Jun 2007 17:12
@Duffer:
Do you agree if I host a copy of your plugin @ Odyssey-Creators as a PurePLUGIN sample ?

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-11-24 00:41:32
Your offset time is: 2024-11-24 00:41:32