Jump to content


Photo

Gm Database System v10.3


  • Please log in to reply
86 replies to this topic

#81 lballaty

lballaty

    GMC Member

  • New Member
  • 83 posts

Posted 30 March 2012 - 07:59 AM

Yes it works but you must import the gml file not the gex if you want to use it in html5 mode. After that, you must recreate the arborecense and comment all db_log call because GMS doesn't have the debug_mode constant.
If you have any problem, let me know and I can send you a gmz file


Thanks I'll have a look at that.

So I need the gml file for any extensions I use and not use the gex files at all?

How are those created? Is there documentation or tutorial somewhere?

thanks for your reply
  • 0

#82 lballaty

lballaty

    GMC Member

  • New Member
  • 83 posts

Posted 30 March 2012 - 08:14 AM

One more thing.

I seem to get uknown function even in GM81 for db_column_get_name_from_pos()

yet when I look into the extension I see that it exists?

Any idea why that would be? BTW it looks like this was already there in GM81 but it compiled without any errors. Once I put it into the HTML5 version it doesn't get past these. So for some reason it doesn't recognize this function within this extension.
  • 0

#83 grugin

grugin

    GMC Member

  • GMC Member
  • 116 posts

Posted 30 March 2012 - 01:18 PM

Remove the gex from your project. This function doesn't exist in the gml file. And to import the gml file, right clik on the Scripts folder et then on Add existing script. Afre that on the imported script file, you must cut each fragment between each # sign on a new script called the name after the # sign.
  • 0

#84 lballaty

lballaty

    GMC Member

  • New Member
  • 83 posts

Posted 30 March 2012 - 01:28 PM

Remove the gex from your project. This function doesn't exist in the gml file. And to import the gml file, right clik on the Scripts folder et then on Add existing script. Afre that on the imported script file, you must cut each fragment between each # sign on a new script called the name after the # sign.


Interesting I have a .gml file visible now in the extension directory in the left side window. When I expand that I can see the function that it complains about. Yet it still won't let me run the game with it there.

Unfortunately I use these functions in the game.

I'll try to ping the person who created the extension to see if they can assist with this. I haven't tried to dig into an extension itself yet. Maybe it is time ...:)
  • 0

#85 benetonmovie

benetonmovie

    GMC Member

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

Posted 30 March 2012 - 05:12 PM

Hey guys. Sorry if I'm late.

I seem to get uknown function even in GM81 for db_column_get_name_from_pos()

That's my fault, I shouldn't have used that function in the example, it's supposed to be private (hidden). In other words, it does exist in the extension, but it can only be used by the extension. It seems GM 8.1 lets you use hidden functions outside the extension (it just doesn't list them in the code completion box), but GM:Studio doesn't, and that's the way it should be. I'll fix that in the next version but for now, if you want to fix the extension, you can do the following:

1) obj_example, Glob Left Pressed, change line 31 to these two lines:

column = db_column_get_from_pos(table, n);
value[n] = get_string(string(db_column_get_name(table, column)), string(db_column_get_default(table, column)));

2) obj_example, Glob Right Pressed, change line 73 to the same two lines (above).

Now, some modules of GM:Studio, including the new Windows C++ runner, don't support extensions yet. I think the only one that does is HTML5. So for the others, you won't be able to use the extension for now unless, as grugin said, you import the scripts instead (which are included in the ZIP: gmdb103_scripts.gml). Unfortunately it is kinda hard to import scripts using that format in GM:Studio (for some reason they removed the "import scripts" feature), so what I recommend is do it in GM8.1 (Scripts > Import Scripts), then import the .gm81 file in Studio. You will have to do two other things to make it work:

1) Call db_init() before doing anything else (normally, the extension does that automatically).
2) Add the following constants (Resources > Define Constants...):

DB_TYPE_REAL: 0
DB_TYPE_STRING: 1
DB_LOG_NORMAL: 0
DB_LOG_WARNING: 1
DB_LOG_ERROR: 2
DB_VERSION: "10.3"


Let me know if you have any problems. I plan to release a new version of the extension once Studio gets out of Beta and extensions are fully supported.


Yes it works but you must import the gml file not the gex if you want to use it in html5 mode. After that, you must recreate the arborecense and comment all db_log call because GMS doesn't have the debug_mode constant.

Are you sure? For me, debug_mode shows up in the code completion box in Studio, and it doesn't seem to break anything (at least not in HTML5).


Thanks!
  • 0

#86 grugin

grugin

    GMC Member

  • GMC Member
  • 116 posts

Posted 02 April 2012 - 02:02 PM

Thank you benetonmovie, that's what I do. But it's strange but for me the db_log function crash at if(debug_mode) line in gms. But everything functions correctly so that's not a problem ^^. Really great extension by the way.
  • 0

#87 lballaty

lballaty

    GMC Member

  • New Member
  • 83 posts

Posted 02 April 2012 - 03:04 PM

Hi,

I did notice ... once I realized that I could just open the gml file in notepad++ ... that you had INTERNA FUNCTION on those. So it does look like at this point I'm just having problems due to that.

I'll try your suggestiong to utilize the function ....

I make memory and teaching games for kids and this db function makes my life much simpler. Especially being able to hold it in RAM as long as I need and not writing to disk every single time I update one of the tables.

Also being able to save them and create them on the fly gives me easy ability to make the games customizable by the user (allowing to save their own content) and allowing to easily save changes without having to mess with registry or complex ways to read/write files.

For me this is the most useful extension I've found so far for the kinds of games I do.

I'm looking forward to being able to put my games on HTML5 as then folks will be able to run it on any operating system so having it work with that will be great.

thanks very much for responding to everyone
  • 0




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users