Author Topic: %file  (Read 1027 times)

Anything that I find that has %file = newFileObject; or anything like that isn't working. I know for sure it's written correctly, but whenever I do the command, etc. that uses it, the file never gets made.

This should go in coding help.

I don't know much about files but I think the syntax is %file = new FileObject();

Anything that I find that has %file = newFileObject; or anything like that isn't working. I know for sure it's written correctly, but whenever I do the command, etc. that uses it, the file never gets made.
it's %file = new FileObject();

Code: [Select]
function readFile(%file) {
if(%file $= "" || !%file) {
%filename = "config/server/test.txt";
} else {
%filename = %file;
}

%file = new FileObject();
%file.openForRead(%filename);

while(!%file.isEOF()) {
%line = %file.readLine();
echo(%line);
}

%file.close();
%file.delete();
}

I know. I was just giving an example. I'm not trying to code anything. This is happening with, like, every addon I come across. I got someone's VIP mod and the auto vip thing didn't work.

You're still asking help on a coding subject, not requesting something to be made.

Just put things related to code in Coding Help.

No, he's asking why that error is showing and probably wants to fix it/have it fixed.