src/console_cmds.cpp
changeset 8504 f4ea0ba39c03
parent 8270 e7c342f6b14c
child 8786 1823ff88a054
equal deleted inserted replaced
8503:1fa1d001eac0 8504:f4ea0ba39c03
   808 		return true;
   808 		return true;
   809 	}
   809 	}
   810 
   810 
   811 	if (argc < 2) return false;
   811 	if (argc < 2) return false;
   812 
   812 
   813 	_script_file = fopen(argv[1], "r");
   813 	_script_file = FioFOpenFile(argv[1], "r", BASE_DIR);
   814 
   814 
   815 	if (_script_file == NULL) {
   815 	if (_script_file == NULL) {
   816 		if (argc == 2 || atoi(argv[2]) != 0) IConsoleError("script file not found");
   816 		if (argc == 2 || atoi(argv[2]) != 0) IConsoleError("script file not found");
   817 		return true;
   817 		return true;
   818 	}
   818 	}
   832 
   832 
   833 	if (ferror(_script_file))
   833 	if (ferror(_script_file))
   834 		IConsoleError("Encountered errror while trying to read from script file");
   834 		IConsoleError("Encountered errror while trying to read from script file");
   835 
   835 
   836 	_script_running = false;
   836 	_script_running = false;
   837 	fclose(_script_file);
   837 	FioFCloseFile(_script_file);
   838 	return true;
   838 	return true;
   839 }
   839 }
   840 
   840 
   841 DEF_CONSOLE_CMD(ConReturn)
   841 DEF_CONSOLE_CMD(ConReturn)
   842 {
   842 {