Eshtiz Posted February 18, 2012 Share Posted February 18, 2012 Well, the topic says it all, dxDrawImage can't load file error from /debugscript dxDrawRectangle( x, y, columns * sbox + spacer, rows * sbox + spacer, background_color ) for i = 1, columns * 5 do local col = math.floor( ( i - 1 ) / 5 ) local row = ( i - 1 ) % 5 local boxx = x + col * sbox + spacer local boxy = y + row * sbox + spacer local item = inventory[ i ] if item then if not isMove or item[4] ~= clickItemSlot.id then dxDrawRectangle( boxx, boxy, box, box, full_color ) dxDrawImage( boxx, boxy, box, box, getImage( item[1], item[2] ) ) -- ammo count for weapons if activeTab == 3 then dxDrawText( tostring( item[2] ), boxx + 2, boxy + 2, boxx + box - 2, boxy + box - 2, tooltip_text_color, 1, "clear", "right", "bottom", false, false, true ) end if not isMove and not clickWorldItem and isInBox( cursorX, cursorY, boxx, boxx + box, boxy, boxy + box ) then local itemName = getItemName( item[1], item[2] ) local itemValue = getItemValue( item[1], item[2] ) if itemValue and #tostring( itemValue ) > 0 and itemValue ~= 1 then itemName = itemName .. " (" .. itemValue .. ")" end tooltip( cursorX, cursorY, itemName, activeTab == 1 and getItemDescription( item[1], item[2] ) ) hoverItemSlot = { invslot = i, id = item[4], x = boxx, y = boxy } end end else dxDrawRectangle( boxx, boxy, box, box, empty_color ) end end end Why wont it load the image? Link to comment
drk Posted February 18, 2012 Share Posted February 18, 2012 Maybe the file don't exists or boxx variable not exists? Link to comment
Eshtiz Posted February 18, 2012 Author Share Posted February 18, 2012 Sorry, it's not and I quite don't understand what you mean Draken, the very same 'line' is exactly the same on two different places in the whole script which is here: http://pastie.org/3409430 It's quite big. 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