I have noticed something strange and I am wondering if anyone has a simple solution.
I am working on a simple app that will do some "stuff", and it has a .dll that should be checked to see if it exists before using it. This code is executed in the create event of one of my objects. It is the only object in the .gmk and it has only got this code in it. Basically it should work.. right?
if(!file_exists("FlipDll.dll"))
{
show_message("ERROR: The FlipDll.dll is missing. Please replace this dll and run the program again.");
game_end();
}
else
{
show_message("Win!");
}Essentially I want to later use command line parameters to determine what my application should do. For example, if you drag a file onto the Game Maker .exe one of the parameters that Game Maker receives is the File name of the file dragged. This is how I discovered the issue.
If you drag a file onto the Game Maker .exe it should/does pass the file name as one of the parameters which I will use later in a different part of the (unwritten) code. However if the file you are passing is from another directory that is not the same as the Game Maker .exe then it seems to do the file_exists() check from the directory that the dragged file came from instead of the Game Maker .exe. Clearly that isn't what I want. It should check for the file in the same directory. It seems to me that file_exists() is getting confused on what it should be checking for and where.
Note: I am aware that I can use program_directory/ + the file to fit it. But I would like to know why Game Maker is acting strangely.
Does anyone know what could be causing this issue?
Edit: For clarity.
Thanks,
Sven



Find content
Male

