Jump to content

boolean value


stefutz101

Recommended Posts

Hi again . I have a problem.

if newbieShow == false then return end 
    local x,y,z = getElementPosition(newbiePosition) 
    local x,y = getScreenFromWorldPosition (x,y,z) 
    local length = dxGetTextWidth(newbieText,1,"default-bold") 
    --dxDrawRectangle ( x-length/2-screenWidth*0.01,y, screenWidth*0.02+length, screenHeight*0.1, tocolor (109,163,61,100) ) 
    dxDrawingColorText(newbieHead,x-length/2-screenWidth*0.01,y, x+length/2+screenWidth*0.01, y+screenHeight*0.03, tocolor(22,255,22,120),0.5, 1.1, "default-bold", "center", "center") 
    dxDrawingColorText(newbieText,x-length/2-screenWidth*0.01,y+screenHeight*0.03, x+length/2+screenWidth*0.01, y+screenHeight*0.07, tocolor(255,255,255,120),0.5, 1, "default-bold", "center", "center") 

dxDrawingColorText(newbieHead,x-length/2-screenWidth*0.01,y, x+length/2+screenWidth*0.01, y+screenHeight*0.03, tocolor(22,255,22,120),0.5, 1.1, "default-bold", "center", "center") 

Attempt to perform arithmetic on local x a boolean value.

So i guess that x isn't a number ? How i can test if that x and y returned from getScreenFromWorldPosition (x,y,z) are numbers ? That's the problem . Btw this is a part from script.

Thanks in advance!

Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...