Author Topic: Writing to the base files disabled or something?  (Read 826 times)

I assume this is how zack0's user content add-on was broken;

Code: [Select]
for(%file=findFirstFile("./Objects/*.*");isFile(%file);%file=findNextFile("./Objects/*.*"))

fileCopy(%file,"base/data/shapes/player");

eval("exec(\"base/data/shapes/player/playertype.cs\");");

I've attempted to use this code; which would normally copy all of the files in Objects/ into base/data/shapes/player, and then execute the playertype.cs that is in Objects/

I would assume this would make custom playertype models, or applying animations to the default blockhead possible, while keeping the face and decal IFL's, because you would execute your playertype.cs from the directory of the original files and all...

EDIT: ah, I see

base/ is set to read only, when downloaded by the launcher

....welp, guess I'm going nowhere with this

anyone know another way of doing this; somehow setting the custom playertypes directory to the base/data/shapes/player folder? :s

« Last Edit: August 28, 2012, 04:59:37 AM by Conservative »

Code: [Select]
eval("exec(\"base/data/shapes/player/playertype.cs\");");What.

Code: [Select]
eval("exec(\"base/data/shapes/player/playertype.cs\");");What.
My code would have saved a .cs that was within the objects folder, to the base/data/shapes/player file, because you can't run a TSShapeConstructor datablock that links to the default files in base/, from an add-on

which are needed in order to have working IFL textures

nor can you execute one from the base files

so eval(""); executes it through the console

My code would have saved a .cs that was within the objects folder, to the base/data/shapes/player file, because you can't run a TSShapeConstructor datablock that links to the default files in base/, from an add-on

which are needed in order to have working IFL textures

nor can you execute one from the base files

so eval(""); executes it through the console

Anything that can call eval() can call exec()

Anything that can call eval() can call exec()
Using just exec(); returned "couldn't find file 'base/data/shapes/player/playertype.cs' ", even when I manually put a file in it

Using just exec(); returned "couldn't find file 'base/data/shapes/player/playertype.cs' ", even when I manually put a file in it
The function was still called...

EDIT: ah, I see

base/ is set to read only, when downloaded by the launcher
Strange, it was never like that before..