Posted: Tue Apr 04, 2017 7:42 pm Post subject: Where is default path for .exe?
I've made a table that reads input from a .csv for easy updating. I set the opening path simply to something like 'file.csv,' put the file in the same directory as the table/trainer, and this works perfectly for both table and trainer types. However if I save as .exe, the script can no longer find the .csv. I tried putting it in the same directory and in the CE directory, but it only works if I write an extra function to manually declare the full path. How/where do I put the .csv so that the .exe can open it directly without specifying the full path?
Joined: 09 May 2003 Posts: 25288 Location: The netherlands
Posted: Wed Apr 05, 2017 2:18 am Post subject:
when you generate the trainer add the csv file to the list of files. when someone runs it it will get extracted at the same spot as the exe
alternatively, use the TrainerOrigin variable in lua which will be set when it's a trainer. it will contain the path to the trainer exe _________________
Do not ask me about online cheats. I don't know any and wont help finding them.
Like my help? Join me on Patreon so i can keep helping
I rather not add it when I generate the trainer because the whole purpose of using the .csv is to be able to update the data it's reading without having to update re-generate the trainer. I will try the TrainerOrigin; I found that earlier but I thought it only worked for .CETRAINER. Will it also work for .exe?
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum You cannot attach files in this forum You can download files in this forum