forum.boolean.name

forum.boolean.name (http://forum.boolean.name/index.php)
-   2D-программирование (http://forum.boolean.name/forumdisplay.php?f=109)
-   -   Types 'Int()' and 'Float' are unrelated (http://forum.boolean.name/showthread.php?t=14600)

harungo 17.04.2011 16:01

Types 'Int()' and 'Float' are unrelated
 
Выдаёт ошибку:Types 'Int()' and 'Float' are unrelated. Смысл ошибки понятен, но почему так, нет :) .
Код(используется Xors3D):
Код:

Import xorsteam.xors3d
Type GButton
        Field x:Float, y:Float
        Field active:Int
        Field img_act:Int, img_deact:Int, img_clck:Int
        Field clicked:Int
        Function Create:GButton(x:Float, y:Float, img_act:String, img_deact:String, img_clck:String)
                Local but:GButton = New GButton
                but.x = x
                but.y = y
                but.active = active
                but.clicked = 0
                but.img_act = xLoadImage(img_act)
                but.img_deact = xLoadImage(img_deact)
                but.img_clck = xLoadImage(img_clck)
                Return but
        End Function
        Method update()
                If (xMouseX() > x) And (xMouseX() < x + xImageActualWidth(img_act)) And (xMouseY() > y) And (xMouseY < y + xImageActualHeight(img_act)) Then 'В этой строке ошибка
                        If xMouseHit() Then
                                xDrawImage(img_clck, x, y)
                                clicked = 1
                        Else
                                xDrawImage(img_act, x, y)
                                            clicked = 0
                        End If
                Else
                        xDrawImage(img_deact, x, y)
                                clicked = 0
                End If
        End Method
End Type

xGraphics3D(800, 600, 32, False, False)
button:GButton = GButton.Create(130, 200, "act.png", "deact.png", "clck.png")
While(Not (xKeyHit(xKEY_ESCAPE) Or xWinMessage("WM_CLOSE")))
                xCls()
        xRenderWorld()
button.update()
        xFlip()
Wend
End

Помогите исправить.

harungo 17.04.2011 16:46

Ответ: Types 'Int()' and 'Float' are unrelated
 
Ошибку нашёл. Закройте тему.


Часовой пояс GMT +4, время: 16:04.

vBulletin® Version 3.6.5.
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Перевод: zCarot