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.

AppGameKit Classic Chat / Mac plugin creation with Purebasic

Author
Message
ShaunRW
DBPro Developer
16
Years of Service
User Offline
Joined: 7th Jan 2008
Location: Brisbane, Australia
Posted: 6th Oct 2017 13:28 Edited at: 6th Oct 2017 13:35
I'm creating an agk plugin dylib using purebasic on a mac. I am able to create regular procedures that can be passed / return integers and floats.

my problems begin when passing strings to the plugin, they become unrecognisable ( See attached image, this should say hello world. ). And using AppGameKit commands from the plugin completely crashes AGK.

Purebasic:


AGK:


Commands.txt:


Is anyone able to tell me where I went wrong?
Any help would be appreciated .

Attachments

Login to view attachments
PartTimeCoder
AGK Tool Maker
9
Years of Service
User Offline
Joined: 9th Mar 2015
Location: London UK
Posted: 6th Oct 2017 17:58
Quote: "my problems begin when passing strings to the plugin, they become unrecognisable"


PB 5.6+ is unicode only now on windows so I am assuming its also the same for linux and mac so you need to convert the strings



Quote: "
And using AppGameKit commands from the plugin completely crashes AGK."


You have setup the 'GetAGKFunction' wrong, try it with this

Attachments

Login to view attachments
ShaunRW
DBPro Developer
16
Years of Service
User Offline
Joined: 7th Jan 2008
Location: Brisbane, Australia
Posted: 7th Oct 2017 01:03
Awsome! Thanks for the help PartTimeCoder much appreciated .

Using the ReceiveAGKPtr function you gave, AppGameKit crashed on plugin import. I had to use *ptr instead of just ptr to get it working. Otherwise everything's good now.

Login to post a reply

Server time is: 2024-04-27 05:48:03
Your offset time is: 2024-04-27 05:48:03