View Issue Details

IDProjectCategoryView StatusLast Update
0005406Multi Theft Auto : EditorMap Editorpublic2011-02-05 21:49
ReporterScriptmanAssigned To 
PrioritynormalSeveritymajorReproducibilitysometimes
Status resolvedResolutionfixed 
PlatformLinuxOSDebianOS VersionLenny
Product Version 
Target Version2.0Fixed in Version2.0 
Summary0005406: Error in MapEditor, Cant start edit mode anymore.
Description

I was testing my stuff via F5, it all worked, but when i tried to go back to the editor mode via F5, i'll get this error:
ERROR: [string "editor_main\client\main.lua"]:181: attempt to preform arithmetic on local 'labelCenterX' (a boolean value)

Steps To Reproduce

Explained above, don't know any other ways to reproduce.

Additional Information

else
if editor_gui.guiGetMouseOverElement() then return end
labelCenterX,labelCenterY, endX,endY,endZ = getCursorPosition()
if labelCenterX == 0 or labelCenterX == 1 or labelCenterY == 0 or labelCenterY == 1 then
return
end
--> labelCenterX = labelCenterX g_screenX <-- Line 181
labelCenterY = labelCenterY
g_screenY
crosshairState = setCursorCrosshairState
end

TagsNo tags attached.

Relationships

child of 0002949 closed Multi Theft Auto : San Andreas Map editor issues 

Activities

Scriptman

2010-06-24 15:43

viewer   ~~0011651

Look at the wiki: http://wiki.mtasa.com/wiki/GetCursorPosition
"If the cursor isn't showing, returns false as the first value."

I think this is the trouble maker.

So, if someone would fix this issue.. :-)
I'm getting this error all the time..

Scriptman

2010-06-24 16:04

viewer   ~~0011652

I've made an patch, this will fix the error:
http://busign.nl/mirror/mtasa/patches/editor_main.patch

Flobu

2010-07-23 23:56

updater   ~~0011817

i think this is fixed

labelCenterX,labelCenterY, endX,endY,endZ = getCursorPosition()
if not labelCenterX or labelCenterX == 0 or labelCenterX == 1 or labelCenterY == 0 or labelCenterY == 1 then
return
end
labelCenterX = labelCenterX g_screenX
labelCenterY = labelCenterY
g_screenY

Scriptman

2011-02-05 21:47

viewer   ~~0012864

Last edited: 2011-02-05 21:47

Lol..
You get the position first and then check if the position is valid, but you don't check if the cursor is showing.., why?
Isn't it better to check if the cursor is showing first?

You said: I think this it fixed, but i added my own patch, and i know its working (for me and x86, don't know about others..)

So i guess this ticket is solved?

Issue History

Date Modified Username Field Change