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 / a2CreateFont command in Advanced 2d plugin

Author
Message
Unseen Ghost
21
Years of Service
User Offline
Joined: 2nd Sep 2002
Location: Ohio
Posted: 23rd Feb 2021 03:36 Edited at: 23rd Feb 2021 03:45
I have run the following example program from the help files of Advanced 2d plugin to get an idea how to use the "a2CreateFont" command and I get an error. I attached an image of the output of the error below. How can I fix this?

[EDIT] actually the error is line 3 not line 2. I messed up the lines lol

Gigabyte Board/2.93Ghtz Intel Core Duo Proc./4GB Ram/Nvidia Geforce 730 2GB/1TB Western Dig. SSD/Windows 10 Home/Dark Basic Pro 9Ex

No one cares how much you know until they know how much you care.

Attachments

Login to view attachments
Raven
19
Years of Service
User Offline
Joined: 23rd Mar 2005
Location: Hertfordshire, England
Posted: 23rd Feb 2021 05:02
a2Size_Char() and a2Style_Normal() are Arrays., so they MUST be passed a2Size_Char(0) and a2Style_Normal(0) when you want to Reference them.
DBP is just letting you know that it KNOW you're trying to access an Array but you're not telling it what Element (Subscript)

Unseen Ghost
21
Years of Service
User Offline
Joined: 2nd Sep 2002
Location: Ohio
Posted: 23rd Feb 2021 20:43
Thank you Raven for pointing that out. When I saw the 2 commands there, I was taking them as just functions because of the empty parentheses
Gigabyte Board/2.93Ghtz Intel Core Duo Proc./4GB Ram/Nvidia Geforce 730 2GB/1TB Western Dig. SSD/Windows 10 Home/Dark Basic Pro 9Ex

No one cares how much you know until they know how much you care.
Unseen Ghost
21
Years of Service
User Offline
Joined: 2nd Sep 2002
Location: Ohio
Posted: 23rd Feb 2021 21:25
I just tried to do what you said and I'm still getting the same error as above

Here is the same code as above except I added the 0's for the arrays

Gigabyte Board/2.93Ghtz Intel Core Duo Proc./4GB Ram/Nvidia Geforce 730 2GB/1TB Western Dig. SSD/Windows 10 Home/Dark Basic Pro 9Ex

No one cares how much you know until they know how much you care.
Raven
19
Years of Service
User Offline
Joined: 23rd Mar 2005
Location: Hertfordshire, England
Posted: 23rd Feb 2021 23:19
Is the plug-in Compatible with the version of DBP you're using?
Some are only compatible with certain versions.
James H
16
Years of Service
User Offline
Joined: 21st Apr 2007
Location: St Helens
Posted: 23rd Feb 2021 23:59 Edited at: 24th Feb 2021 00:02
Those are not arrays - put anything in and you will get a parameter mismatch error, without the zero your code works perfectly fine here, using version 1.077(U7.7RC7) Specs in sig. a2Size_Char is the mode and a2Style_Normal is the style, you can replace either with similar commands listed in keywords file.

Not sure about any specific version required, but you should make sure those commands are highlighted in the editor, if not chances are you haven't installed it correctly if at all - ofc could be you just didn't install keywords file as it would compile fine without so long as the dll is correctly placed. Only sure way of knowing - get other advanced 2d plugin commands working.
Win 7 Pro 64 bit SP1, AMD A4-5300 APU 3.4GHz, 8GB DDR3, NVidia GeForce GTX 750 1GB GDDR5, ASUS A55BM-E
Unseen Ghost
21
Years of Service
User Offline
Joined: 2nd Sep 2002
Location: Ohio
Posted: 24th Feb 2021 02:22
I've installed the latest 7.7R7 update and the 9Ex version after that. I have all the commands highlighted in blue in the Synergy IDE. I have figured it out. I didn't have the right version dll installed. I had an older version instead. I thought I put the new one in, but didn't. I had the right keywords in, but wrong dll.

Thanks for the help
Gigabyte Board/2.93Ghtz Intel Core Duo Proc./4GB Ram/Nvidia Geforce 730 2GB/1TB Western Dig. SSD/Windows 10 Home/Dark Basic Pro 9Ex

No one cares how much you know until they know how much you care.
James H
16
Years of Service
User Offline
Joined: 21st Apr 2007
Location: St Helens
Posted: 24th Feb 2021 02:27
Glad it worked out for you
Win 7 Pro 64 bit SP1, AMD A4-5300 APU 3.4GHz, 8GB DDR3, NVidia GeForce GTX 750 1GB GDDR5, ASUS A55BM-E

Login to post a reply

Server time is: 2024-04-20 12:12:25
Your offset time is: 2024-04-20 12:12:25