Jump to content


Photo

Is it still possible to store files externally?


  • Please log in to reply
11 replies to this topic

#1 swang99

swang99

    GMC Member

  • GMC Member
  • 40 posts
  • Version:GM8

Posted 15 April 2012 - 03:06 AM

Hi guys I know that many functions such as execute_... and object_event_add have been removed. So what I want to know is there any alternate way to load external object from a text file and add event? Also what happen after you compile the game? Is all the file stored in a large exe or externally?
  • 0

#2 cotycrg

cotycrg

    GMC Member

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

Posted 15 April 2012 - 03:07 AM

Not entirely sure what your question is..but to help you out.

You can save/load from text files, on any device.
You can save/load from ini files, on any device.

Hope that clears up whatever you're needing.
  • 0

#3 Mike.Dailly

Mike.Dailly

    Evil YoYo Games Employee

  • Administrators
  • 1488 posts
  • Version:GM:Studio

Posted 15 April 2012 - 06:13 AM

Included files currently has issues. This will be addressed soon.
  • 1

#4 swang99

swang99

    GMC Member

  • GMC Member
  • 40 posts
  • Version:GM8

Posted 15 April 2012 - 10:49 PM

I receive "object_add() not implemented" error whenever I try to use it so is those function such as object_add, sprite_add etc. Are they going to be implemented?
  • 0

#5 brighteyes

brighteyes

    GMC Member

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

Posted 16 April 2012 - 02:48 AM

Not entirely sure what your question is..but to help you out.

You can save/load from text files, on any device.
You can save/load from ini files, on any device.

Hope that clears up whatever you're needing.


Really? I've had no success writing files to my iPhone 4. It reads them just fine but cannot create files. I haven't tried modifying existing files though. No issues on Windows or Android writing files, thankfully.
  • 0

#6 azcodon

azcodon

    GMC Member

  • GMC Member
  • 118 posts
  • Version:Unknown

Posted 16 April 2012 - 02:50 AM

i tried and successed ,the problem is not enrypt.each object,event.....make by script.and all of them is js :))
  • 0

#7 brighteyes

brighteyes

    GMC Member

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

Posted 16 April 2012 - 03:07 AM

I don't follow you :[

I just did a simple test:
fileID = file_text_open_write("test.txt");
file_text_write_string(fileID, "testing");
file_text_close(fileID);

It returns the file is not opened for writing error.

I also tried adding working_directory and program_directory to the path and it makes no difference.
  • 0

#8 azcodon

azcodon

    GMC Member

  • GMC Member
  • 118 posts
  • Version:Unknown

Posted 16 April 2012 - 03:58 AM

your code:file_text_write_string(fileID, "testing"); <<<<wrong
compiling is sytem file.then it can not read .the file is extent 'testing.txt'
  • 0

#9 brighteyes

brighteyes

    GMC Member

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

Posted 16 April 2012 - 04:52 AM

your code:file_text_write_string(fileID, "testing"); <<<<wrong
compiling is sytem file.then it can not read .the file is extent 'testing.txt'


Sorry man, I'm just having a hard time understanding your English. My point was just that the code above works fine on Windows and Android (Viewsonic G-Tablet running 2.2), but returns the "file is not opened for reading" at run-time (no compile errors) on iOS.


Anyways, I feel like I may have gotten off-topic. Didn't mean to hijack your thread swang99!

EDIT: You know what, ignore my posts. Apparently it works just fine now >_< Must have gotten fixed in one of the updates without me noticing.

Edited by brighteyes, 16 April 2012 - 06:16 AM.

  • 0

#10 Airton

Airton

    GMC Member

  • New Member
  • 1 posts
  • Version:Unknown

Posted 15 June 2012 - 03:42 PM


your code:file_text_write_string(fileID, "testing"); <<<<wrong
compiling is sytem file.then it can not read .the file is extent 'testing.txt'


Sorry man, I'm just having a hard time understanding your English. My point was just that the code above works fine on Windows and Android (Viewsonic G-Tablet running 2.2), but returns the "file is not opened for reading" at run-time (no compile errors) on iOS.


Anyways, I feel like I may have gotten off-topic. Didn't mean to hijack your thread swang99!

EDIT: You know what, ignore my posts. Apparently it works just fine now >_< Must have gotten fixed in one of the updates without me noticing.


I can not write anything in the archives GM Studio

mayarq = file_text_open_append("dados.txt");
file_text_write_string(mayarq,"Teste");
file_text_writeln(mayarq);
file_text_close(mayarq);
  • 0

#11 cutch23

cutch23

    GMC Member

  • GMC Member
  • 25 posts
  • Version:Unknown

Posted 04 July 2012 - 03:52 AM

I'm having trouble as well.

This worked in HTML5, but doesn't seem to work now:


f=file_text_open_read('four.txt')
while( !file_text_eof(f) ){
s = file_text_read_string(f)
file_text_readln(f);
ds_map_add(global.dictionary,s,0);
}
file_text_close(f);
  • 0

#12 Billwaa

Billwaa

    Graphic Designer

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

Posted 09 November 2012 - 12:06 AM

Note sure if it is my fault or the steam studio version have some bug, I tried to write to a file, didn't work.

//Writing to Achievement File
file = file_text_open_write("\data\achievement.dat");
file_text_write_string(file, achievement);
file_text_write_string(file, achievement);
file_text_close(file);

When I run this, the program said file not opened for writing or something like that.

//Writing to Achievement File
file = file_text_open_append("\data\achievement.dat");
file_text_write_string(file, achievement);
file_text_write_string(file, achievement);
file_text_close(file);

When I run this, GM Game just crash...
  • 0




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users