Author Topic: overwriting file from a different directory  (Read 3087 times)

I am making a custom UI and was wondering if it is possible to create a script that automatically overwrites the default ui files to the custom ones from an addon folder, instead of doing it manually

isnt there like pathCopy or something like that?

filycopy(path1, path2)
does not work for files in zip files

filycopy(path1, path2)
does not work for files in zip files
so since addons only work inside zip files, making something  like this is useless?

add-ons work in folders
also I'm pretty sure you can copy from the zip the add-on is in, just not to
« Last Edit: September 23, 2013, 12:41:06 PM by Electrk »

add-ons work in folders
also I'm pretty sure you can copy from the zip the add-on is in, just not to
oh, ok
thanks

also I'm pretty sure you can copy from the zip the add-on is in, just not to
no, you can't

only if its a plaintext file using openforread and openforwrite

Couldn't you do something like this?

fileCopy("./image.png", "base/folder/etc");

Couldn't you do something like this?

fileCopy("./image.png", "base/folder/etc");
it doesn't work



so what works
not using a zip file

using tcpobjects to download the files form a webserver and placing them in a temp folder to copy next time

so how exactly would I write the script? Idk anything about writing the functions or whatever
and it wouldnt be in a server.cs, right? I need something for when the game itself launches, not a server

anyone?
putting just "fileCopy("./authBar.png", "base/client/ui");" straight into a "client.cs" file doesn't work at all

not using a zip file

using tcpobjects to download the files form a webserver and placing them in a temp folder to copy next time

instead of using tcpobjects and relying on a webserver, just write the file you want to copy from to a different, accessible location, and write to the directory from there.

ok ok, just tell me something that i can easily do right now
i dont know any coding at all, but if you are nice you can come up with a script for me :)