|
Post by baduser on May 18, 2018 11:58:54 GMT
i get sometime the error:"java.lang.nullpointerexception...." after 1h or 2h or 20 min. Its come totally random, for all the same function "search()".
image1=Pattern("image1.png"):similar(0.9) ... ... reg1=Region(x,y,b,h) ... ...
action1=function() "action" end
----tabel with images+Region images={ [image1]=reg1, [image2]=reg2, [image3]=reg3, [image4]=reg4, [image5]=reg5, [image6]=reg6, [image7]=reg7, [image8]=reg8, [image9]=reg9, [image10]=reg10
} ---table with image+action action={ [image1]=action1, [image2]=action2, [image3]=action3, [image4]=action4, [image5]=action5, [image6]=action6, [image7]=action7, [image8]=action8, [image9]=action9, [image10]=action10
}
function search()
snapshot() for imageX,regi in pairs(images) do if regi:exists(imageX,0.01) then if action[imageX]==nil then--i got some time the erro:"function is nil" and that fix it. return end
return action[imageX]() end end
end
|
|
|
Post by Acera Dryd on May 19, 2018 16:03:26 GMT
What does the actions do?
Did you know which imageX let to the error? For example with toast(imageX:getFileName())
|
|
|
Post by baduser on May 20, 2018 3:06:33 GMT
What does the actions do? Did you know which imageX let to the error? For example with toast(imageX:getFileName()) idk, that call me only the function "search" do the error. the action1-10 are fill with move/touchs or set variables true or false. I will check this, whiche image do the error.
|
|