Jump to content


Photo

How to include constants w/ extension?


  • Please log in to reply
4 replies to this topic

#1 iam1me

iam1me

    GMC Member

  • GMC Member
  • 380 posts
  • Version:GM8

Posted 18 February 2012 - 03:56 PM

Hi all,

So I'm writing an extension for GM, but it uses a number of constants. I'd prefer to keep these constants as it makes using the extension much more intuitive. Is there a way to package these constants with my code when I

1. Export my scripts as a GML
2. Turn them into a GEX

Also, are there any popular websites by the members here that will host GM extensions? I may end up making my own website, since I need to make one for my other activities anyways, but it would be nice if I could post it up for free on a reliable website dedicated to GM.
  • 0

#2 Medusar

Medusar

    GMC Member

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

Posted 18 February 2012 - 04:15 PM

1. Export my scripts as a GML

No. You can create a script that defines global variables but you can't make them constants.

2. Turn them into a GEX

Yes, just add your GML file to the Extension creator and a tab will show up allowing you to define constants.

Also, are there any popular websites by the members here that will host GM extensions?

Yes, there are some, but they don't tend to be very reliable in the sense that most of them go offline rather quickly. UpUrLoad is still alive though, and I like it. There are millions of other websites out there that will also host extensions.
  • 0

#3 iam1me

iam1me

    GMC Member

  • GMC Member
  • 380 posts
  • Version:GM8

Posted 18 February 2012 - 08:16 PM


1. Export my scripts as a GML

No. You can create a script that defines global variables but you can't make them constants.


I guess I'll just have to export the constants separately and have them load em in for now. I'll ultimately release it as a GEX, but I think initially - for the beta version - I'll release it as a GML.


2. Turn them into a GEX

Yes, just add your GML file to the Extension creator and a tab will show up allowing you to define constants.


Where do I download this extension creator? I haven't started using it yet.


Also, are there any popular websites by the members here that will host GM extensions?

Yes, there are some, but they don't tend to be very reliable in the sense that most of them go offline rather quickly. UpUrLoad is still alive though, and I like it. There are millions of other websites out there that will also host extensions.


Thanks, I'll try that one out :)
  • 0

#4 Medusar

Medusar

    GMC Member

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

Posted 19 February 2012 - 10:44 AM

Where do I download this extension creator?

If you look in the extensions section of this forum, you'll come across a pinned topic called [topic="278192"]Extension Maker[/toipc]... not too difficult to find I'd say...
  • 0

#5 iam1me

iam1me

    GMC Member

  • GMC Member
  • 380 posts
  • Version:GM8

Posted 19 February 2012 - 03:48 PM


Where do I download this extension creator?

If you look in the extensions section of this forum, you'll come across a pinned topic called [topic="278192"]Extension Maker[/toipc]... not too difficult to find I'd say...



No, not difficult - but apparently it is difficult to give help politely.
  • 0




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users