I have most of a script working to level combat.
It crashes occasionally with the exception shown below. I was hesitant to post it on the official buglist since I can't figure out what would cause it.
I tried researching access violation messages but didn't really find anything. What causes access violations?
My code is calling mainscreen.findObject() to locate and click on the target. I modified mainscreen to fix the 'x' 'y' munging issue I reported on the bug page. Now the script runs, sometimes for a while, but this access violation issue is popping up.
Calling this version of findObject():Code:-- TRSMainscreen.findObject() ---- Colors found: 42 ---- Possible objects found: 1 ---- isMouseOverText() ------ Current mouse-over text: "Attack Warped cockroach" ------ Found "ockroach" in mouse-over string: "Attack Warped cockroach" ---- isMouseOverText(): True ---- Successfully mouse'd object -- TRSMainscreen.findObject(): True mainscreen.getBounds() = {X1 = 0, Y1 = 0, X2 = 734, Y2 = 407} -- TRSMainscreen.findObject() ---- Colors found: 25 ---- Possible objects found: 0 -- TRSMainscreen.findObject(): False -- FAILED to find monster, sleeping -- TRSMainscreen.findObject() ---- Colors found: 113 ---- Possible objects found: 1 ---- isMouseOverText() Exception in Script: Runtime error: "Access violation" at line 544, column 62 in file "C:\Simba\Includes\srl-6\lib\core\text.simba"
Code:result := mainscreen.findObject(x, y, monsterColor(mname), monsterTol(mname), colorSetting(2, monsterHue(mname), monsterSat(mname)), mainscreen.getCenterPoint(), monsterWidth(mname) , monsterHeight(mname), monsterPointMatch(mname), [monsterUptext(mname)], MOUSE_LEFT);







Reply With Quote




