roaddog Posted July 14, 2014 Share Posted July 14, 2014 Alright guys. I need a little help about this argument, so whenever it renders, warnings apppear y1 and y2 are nill function clicked () if source == rulesb then guiSetText (helpmemo, rules) y1 =(158/ry)*sy y2 = (189/ry)*sy elseif source == Infob then y1 = (199/ry)*sy y2 = (230/ry)*sy guiSetText (helpmemo, commands) elseif source == rosterb then y1 = (240/ry)*sy y2 = (271/ry)*sy guiSetText (helpmemo, info) elseif source == commandb then y1 = (281/ry)*sy y2 = (312/ry)*sy guiSetText (helpmemo, admins) end end addEventHandler("onClientGUIClick", root, clicked) function fill () if (isOpen) then dxDrawRectangle((211/rx)*sx, (158/ry)*sy, (157/rx)*sx, (31/ry)*sy, tocolor(107, 87, 171, 185), true) dxDrawLine((367/rx)*sx, y1, (367/rx)*sx, y2, tocolor(255, 255, 255, 255), 2, true) end addEventHandler("onClientRender", root, fill) how do I solve it? Link to comment
12p Posted July 14, 2014 Share Posted July 14, 2014 You must declare those values before anything else. And if possible, set them a default value. This line at the beginning of the script should do the trick: y1,y2 = 0,0 Unless you're not posting something relevant here. Link to comment
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now