我是剪辑软件的新手,这是我的第一个任务。当我加载并运行程序时,它显示错误,请帮助我,我必须在2小时内提交。不知道如何解决它们,所有规则互不相同,因此我无法解决它们。请帮助我修复所有错误。我必须在2个小时内尝试很多次。
我如何解决它们指导我。
setReadOnly(True)
这些是我运行它们时显示的错误。
var printer = require("printer");
filename = process.argv[2] || __filename;
console.log('platform:', process.platform);
console.log('default printer name: ' + (printer.getDefaultPrinterName() || 'is not defined on your computer'));
console.log('try to print file: ' + filename);
if( process.platform != 'win32') {
printer.printFile({filename:filename,
printer: process.env[3],
success:function(jobID){
console.log("sent to printer with ID: "+jobID);
},
error:function(err){
console.log(err);
}
});
} else {
var fs = require('fs');
printer.printDirect({
data:fs.readFileSync(filename).toString(),
printer: process.env[3],
type: 'RAW',
success:function(jobID){
console.log("sent to printer with ID: "+jobID);
},
error:function(err){
console.log(err);
}
});
答案 0 :(得分:0)
;; Fix #1: Added semicolons
;; Ball_Identification_Expert_System
.
.
.
;; Fix #2: Added Quotation Mark
(deffacts ball-database "Adding the balls database to the facts."
;;; Table Tennis
(ball (name "Table Tenis")
.
.
.
;; Fix #3: Missing deffunction header and initial answer
(deffunction ask-question (?qBEG ?qMID ?qEND $?allowed-values)
(printout t ?qBEG ?qMID ?qEND)
(bind ?answer (read))
;;; This function is used for every question made to the user.
.
.
.
;; Fix #4: Removed space
(defrule askEnvironment
.
.
.
;; Fix #5: Removed space
(defrule askSpots