Attract-Mode Support Forum
Attract-Mode Support => Scripting => Topic started by: zeroid on June 10, 2015, 01:00:05 AM
-
I obviously dont see how I can do this.
I did tried to look at Squirrel to do it.
Apparently my C skills sucks and I only know C#.
Anyone would shine me a light would be very much appreciated.
Thanks in advance.
-
There is no "copy" function. If you include the file module there is a ReadTextFile and WriteTextFile class you could use to for text.
If you are working with images, you'll need to use the builtin squirrel functions to read in the bytes, then write the byte back to the new location:
http://www.squirrel-lang.org/doc/sqstdlib3.html#d0e152
You can look at the file module code to see how to read/write files in squirrel..
The file module could use some updates to do some additional common file operations, so if you can create a copy(from,to) function - perhaps you can submit it to be included in that module? :)