Wysłany: 2019-12-28, 15:06
P.Wiśnia
Programista LUA
Wiek: 24 Na forum: 4044 dni Posty: 568
Nick w MP: P.Wiśnia
Piwa : 376
B??d: c.lua:19: attempt to compare nil with number
function isMouseInPosition ( psx , psy , pssx , pssy , abx , aby )
if not isCursorShowing () then return end
cx , cy = getCursorPosition ()
cx , cy = cx * sx , cy * sy
if cx >= psx and cx <= psx + pssx and cy >= psy and cy <= psy + pssy then -- 19 linijka
return true , cx , cy
else
return false
end
end
Przyk ? ad wywo ? ania :
isMouseInPosition ( screenW * 0.4656 , screenH * 0.4435 , screenW * 0.0693 , screenH * 0.1130 )
Wysłany: 2019-12-28, 15:42
Wilq
Wiek: 24 Na forum: 4428 dni Posty: 3410
Piwa : 739
Wysłany: 2019-12-28, 15:49
P.Wiśnia
Programista LUA
Wiek: 24 Na forum: 4044 dni Posty: 568
Nick w MP: P.Wiśnia
Piwa : 376
Tak
local sx , sy = guiGetScreenSize ()
Wysłany: 2019-12-29, 23:09
THEGizmo
Modeler/Uczeń Lua
Wiek: 27 Na forum: 4141 dni Posty: 255
Nick w MP: THEGizmo
Piwa : 3072
P.Wi?nia , Sprawd? tera
function isMouseInPosition ( psx , psy , pssx , pssy )
if not isCursorShowing () then return end
local cursorx , cursory = getCursorPosition ()
local screenx , screeny = guiGetScreenSize ()
cx , cy = cursorx * screenx , cursory * screeny
if cx > psx and cx < psx + pssx and cy > psy and cy < psy + pssy then
return true
else
return false
end
end
licz? na or
Tagi: znajdowanie :: pozycji :: myszki.
Anonymous
Na forum: 245 dni
Posty: 1
Anonymous Koniecznie zajrzyj na: