Jump to content


Photo

Defining external function


  • Please log in to reply
4 replies to this topic

#1 holgersson1988

holgersson1988

    GMC Member

  • GMC Member
  • 141 posts
  • Version:GM:Studio

Posted 27 March 2012 - 02:58 PM

Hi I've made some dlls and php-scripts to connect to my database. Actually a friend made them for me. He used GM8.1 to test it, and he used external_define do load the dlls.
I tried it and it worked, then I imported the scripts to my project (using GM:HTML5) and added the dlls in the folder of the game. But when I start the game I get an "error defining external function".

Is it something I've done wrong or is it not possible to use DLLs in HTML5 even in windows mode?
Thanks in advance!

Jonas Holgersson

EDIT: If i create an application (.exe) and put the DLLs in that folder it works.

Edited by holgersson1988, 27 March 2012 - 03:00 PM.

  • 0

#2 Mike.Dailly

Mike.Dailly

    Evil YoYo Games Employee

  • Administrators
  • 1482 posts
  • Version:GM:Studio

Posted 27 March 2012 - 05:40 PM

You can not use DLL's in a web browser environment. JavaScript only, otherwise it would be a MASSIVE security hole!!

Would you download and run native code from any old website?
  • 0

#3 holgersson1988

holgersson1988

    GMC Member

  • GMC Member
  • 141 posts
  • Version:GM:Studio

Posted 27 March 2012 - 06:00 PM

You can not use DLL's in a web browser environment. JavaScript only, otherwise it would be a MASSIVE security hole!!

Would you download and run native code from any old website?

But I'm not using it in a web browser environment, I'm basically using GM:HTML5 as if it was GM 8.1.
  • 0

#4 Mike.Dailly

Mike.Dailly

    Evil YoYo Games Employee

  • Administrators
  • 1482 posts
  • Version:GM:Studio

Posted 27 March 2012 - 06:32 PM

Ah.... my apologies. Your in the HTML5 section, not the GM8.1 section, but I understand why you posted here. Sounds like a bug. Go and file a new bug, and attach your code as an example - feel free to mark it as private.
  • 0

#5 holgersson1988

holgersson1988

    GMC Member

  • GMC Member
  • 141 posts
  • Version:GM:Studio

Posted 27 March 2012 - 08:28 PM

I fixed it by saving it in a new project, re-imported the scripts and overwriting the DLLs and restarting GM:HTML5.
Working just fine now. :)

Thanks for the help though!

Holgersson Entertainment
  • 0




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users