Jump to content

guiGridListSetItem


pa3ck

Recommended Posts

Hello there, my problem is that I can't get this damn thing work. Here is the code

  
addEventHandler("onClientResourceStart", resourceRoot, 
    function() 
        jobGui = guiCreateWindow(673, 235, 247, 345, "Jobs ~ pa3ck", false) 
        guiWindowSetSizable(jobGui, false) 
        guiSetVisible(jobGui, false) 
  
        jobGrid = guiCreateGridList(9, 21, 228, 314, false, jobGui) 
        guiGridListAddColumn(jobGrid, "Job:                          Payment:", 0.9) 
        jobTrucker = guiGridListAddRow(jobGrid) 
        guiGridListSetItemText(jobGrid, 0, 1, "Trucker           20 dollars", false, false) 
  
        jobClose = guiCreateButton(14, 277, 200, 27, "Close", false, jobGrid) 
        jobQuit = guiCreateButton(14, 240, 200, 27, "Quit job", false, jobGrid) 
        jobTake = guiCreateButton(14, 203, 200, 27, "Take job", false, jobGrid)     
         
        addEventHandler('onClientGUIClick', jobClose, function() if (source == jobClose) then guiSetVisible(jobGui, false) showCursor(false) end end) 
        addEventHandler('onClientGUIDoubleClick', jobTrucker, function() if (source == jobTrucker) then outputChatBox('Test.') end end) 
    end 
) 
  

Debugscript error: Bad argument at line 27, expected element at argument 2 got number "0". The row itself shows up without a problem, I can even click it, but does not do anything. I can't figure out what's the problem... Any idea?

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...