Jump to content

Bad argument @guiGridListGetItemText


Karuzo

Recommended Posts

Hey Guys,

as the title says i have a problem with guiGridListGetItemText.

It says bad argument at line 39 with guiGridListGetItemText expected number .

Code:

Para.window[1] = guiCreateWindow(left, top, windowWidth, windowHeight, "Para Gönderme Paneli", false) 
        guiWindowSetSizable(Para.window[1], false) 
        guiWindowSetMovable(Para.window[1], false) 
        guiSetVisible(Para.window[1],false) 
        guiSetAlpha(Para.window[1], 1.00) 
  
        Para.gridlist[1] = guiCreateGridList(13, 36, 158, 220, false, Para.window[1]) 
        playcol = guiGridListAddColumn(Para.gridlist[1], "Oyuncu", 0.9) 
        guiGridListAddRow(Para.gridlist[1]) 
         
    for id, playeritem in ipairs(getElementsByType("player")) do  
        local row = guiGridListAddRow ( Para.gridlist[1] ) 
        guiGridListSetItemText ( Para.gridlist[1], row, playcol, string.gsub ( getPlayerName (playeritem), '#%x%x%x%x%x%x','' ), false, false ) 
    end 
     
  
        Para.scrollbar[1] = guiCreateScrollBar(137, 0, 21, 220, false, false, Para.gridlist[1]) 
        guiScrollBarSetScrollPosition(Para.scrollbar[1], 100.0) 
  
        Para.label[1] = guiCreateLabel(185, 60, 45, 18, "Paran:", false, Para.window[1]) 
        guiSetFont(Para.label[1], "default-bold-small") 
        Para.label[2] = guiCreateLabel(240, 60, 133, 18, "", false, Para.window[1]) 
        guiSetFont(Para.label[2], "default-bold-small") 
        Para.label[3] = guiCreateLabel(185, 97, 45, 18, "Miktar:", false, Para.window[1]) 
        guiSetFont(Para.label[3], "default-bold-small") 
        Para.edit[1] = guiCreateEdit(240, 100, 133, 25, "", false, Para.window[1]) 
        Para.button[1] = guiCreateButton(367, 229, 81, 27, "Kapat", false, Para.window[1]) 
        guiSetFont(Para.button[1], "default-bold-small") 
        guiSetProperty(Para.button[1], "NormalTextColour", "FFAAAAAA")    
        Para.button[2] = guiCreateButton(205, 229, 138, 27, "Gönder", false, Para.window[1]) 
        guiSetFont(Para.button[2], "default-bold-small") 
        guiSetProperty(Para.button[2], "NormalTextColour", "FFAAAAAA")     
  
  
  
addEventHandler("onClientGUIClick", Para.button[2], 
function() 
    if source == guiGridListGetItemText(Para.gridlist[1],guiGridListGetSelectedItem(Para.gridlist[1])) ~= "Oyuncu sec" then 
        local getComboPlayer = guiGridListGetItemText(Para.gridlist[1]),guiGridListGetSelectedItem(Para.gridlist[1]) 
        local getMoneyToSend = guiGetText(Para.edit[1]) 
        if getComboPlayer and getMoneyToSend then 
            triggerServerEvent("onPlayerReceiveMoney",localPlayer,getComboPlayer,getMoneyToSend) 
        end 
    end 
    end ) 

hope you can help me .

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