11:27:46 PM: [string "YPNo1: YPCheckSol: Execute script 'checksol..."]:2: attempt to call global 'checksol' (a nil value)
11:27:46 PM: stack traceback:
[string "YPNo1: YPCheckSol: Execute script 'checksol..."]:5: in function 'checksol'
[string "YPNo1: YPCheckSol: Execute script 'checksol..."]:2: in function <[string "YPNo1: YPCheckSol: Execute script 'checksol..."]:1>
[C]: in function 'xpcall'
[string "YPNo1: YPCheckSol: Execute script 'checksol..."]:1: in main chunk
P1PosV = getObject('Values[P1Pos]')
P2PosV = getObject('Values[P2Pos]')
P6PosV = getObject('Values[P6Pos]')
P7PosV = getObject('Values[P7Pos]')
P8PosV = getObject('Values[P8Pos]')
P1PV = P1PosV:getInt(VValueInt)
P2PV = P2PosV:getInt(VValueInt)
P6PV = P6PosV:getInt(VValueInt)
P7PV = P7PosV:getInt(VValueInt)
P8PV = P8PosV:getInt(VValueInt)
PuzCor = getObject('Conditions[PuzzleCorrect]')
PuzIncor = getObject('Conditions[PuzzleIncorrect]')
function checksol()
print("start checking")
wrongon = true
righton = true
poscomp = {P1PV, P2PV, P6PV, P7PV, P8PV}
possol = {3,2,4,5,1}
print("start righton check")
for k = 1 to 5 do
if poscomp[k] != possol[k] then
righton = false
end
end
print("start wrongon check")
for k = 1 to 5 do
if poscomp[k] == possol[k] then
wrongon = false
end
end
PuzCor:setValue(VConditionValue,righton)
PuzIncor:setValue(VConditionValue,wrongon)
end
str1 = 'Isn\'t it a wonderful day?'
str2 = "Isn't it a wonderful day?"
for k = 1 to 5 do