Some Errors
#1

Код:
public OnFilterScriptInit()
{
	if(!fexist("Files\file.cfg"))
	{
	
		new File:file = fopen("Files\Data.cfg", io_write);
		fwrite(file, "text");
		fclose(file);
	
	}

	print(" FS Loaded");
	return 1;
}
Код:
error 027: invalid character constant
error 027: invalid character constant
error 027: invalid character constant
error 027: invalid character constant
Reply
#2

Код:
if(!fexist("Files/file.cfg"))
	{
	
		new File:file = fopen("Files/Data.cfg", io_write);
Reply
#3

file functions uses "/" not "\"
And you must add another "/" in the debut
PHP код:
"/Files/file.cfg" 
Reply
#4

Oh,thanks for that,i totally forgot xD + REP
Reply
#5

Quote:
Originally Posted by Shinja
Посмотреть сообщение
file functions uses "/" not "\"
And you must add another "/" in the debut
PHP код:
"/Files/file.cfg" 
Actually both are valid (at least backlash is valid for Windows, but Linux uses slash instead). You just need to escape the backslash "Files\\file.cfg" to be able to compile it and no, it doesn't require any (back)slash before the folder's name.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)