Jump to content


Photo

execute_file()


  • Please log in to reply
4 replies to this topic

#1 Data-Fi

Data-Fi

    GMC Member

  • GMC Member
  • 38 posts
  • Version:Unknown

Posted 27 July 2011 - 03:09 AM

So I am making a level editor, and whenever you create an instance in the editor it writes the code to create it at that point in a .gml file, i've tried .txt files too. So that works just fine, so the file looks like, instance_create(119, 339, 13);instance_create(134,132,13) and so forth all on one line. I am trying to use execute_file() in the creation event for the object that controls the creation and writes the file. I think my problem is about the arguments. I just want to execute the entire file. I don't think I understand how to use arguments to make it create these objects.

help please!

I live in the woods right now and only have internet at my friends house, so if I don't get a reply in a half hour I'll be back online sometime tomorrow.

thanks

Edited by Mr. Skellington, 27 July 2011 - 03:11 AM.

  • 0

#2 TechnoGeek4681

TechnoGeek4681

    GMC Member

  • New Member
  • 143 posts
  • Version:GM8

Posted 27 July 2011 - 03:19 AM

I don't understand what the problem is from your post, but you only need the first argument to execute_file, fname. The other ones work like in scripts, they get written to argument0, argument1, etc.
  • 0

#3 IceMetalPunk

IceMetalPunk

    InfiniteIMPerfection

  • GMC Elder
  • 9328 posts
  • Version:Unknown

Posted 27 July 2011 - 03:20 AM

Firstly, I think this should be in Novice, so I'll report it to be moved there.

Secondly, you haven't told us what's wrong. That looks just fine; calling execute_file(FileNameHere) should create your instances just fine. What's going wrong that shouldn't when you try it?

-IMP ;) :)
  • 0

#4 Data-Fi

Data-Fi

    GMC Member

  • GMC Member
  • 38 posts
  • Version:Unknown

Posted 27 July 2011 - 03:51 AM

ok so I tried creating a new game file and putting in this code and it worked, so it's something else in my tedious amount of scripts that is stopping this code from happening, thank you guys for your time
  • 0

#5 Gamer3D

Gamer3D

    Human* me = this;

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

Posted 27 July 2011 - 04:19 AM

Before you leave this thread, please take my advide, and for the good of everyone who might possibly use your program, STOP USING EXECUTE_FILE. It's too easy to abuse.
  • 0




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users