justn Posted March 14, 2014 Posted March 14, 2014 (edited) WARNING: carspawner\gui.lua:31: Bad argument @ 'guiGridListSetItemText' [Expected bool at argument 5, got string 'Pony'] cars = { {419}, {413} --{carID}, } local l, w = guiGetScreenSize() CarSpawner_Window = guiCreateWindow(292, 255, 391, 281, "*CIR* - Car Spawner", false) guiWindowSetSizable(CarSpawner_Window, false) guiSetAlpha(CarSpawner_Window, 1.00) guiSetVisible(CarSpawner_Window,false) CarSpawner_Label = guiCreateLabel(10, 25, 142, 15, "Select a vehicle", false, CarSpawner_Window) guiSetFont(CarSpawner_Label, "default-bold-small") CarSpawner_Gridlist = guiCreateGridList(10, 45, 371, 185, false, CarSpawner_Window) guiGridListAddColumn(CarSpawner_Gridlist, "#", 0.5) guiGridListAddColumn(CarSpawner_Gridlist, "Vehicle Name:", 0.5) guiGridListAddRow(CarSpawner_Gridlist) guiGridListSetItemText(CarSpawner_Gridlist, 0, 1, "-", false, false) guiGridListSetItemText(CarSpawner_Gridlist, 0, 2, "-", false, false) CarSpawner_Spawn = guiCreateButton(37, 240, 146, 31, "Spawn", false, CarSpawner_Window) guiSetProperty(CarSpawner_Spawn, "NormalTextColour", "FFAAAAAA") CarSpawner_Close = guiCreateButton(224, 240, 134, 31, "Close", false, CarSpawner_Window) guiSetProperty(CarSpawner_Close, "NormalTextColour", "FFAAAAAA") for i,v in ipairs (cars) do local carName = getVehicleNameFromModel (v[1]) local row = guiGridListAddRow(CarSpawner_Gridlist) guiGridListSetItemText(CarSpawner_Gridlist, row, 0, 1, "-", false, true) guiGridListSetItemText(CarSpawner_Gridlist, row, 0, 2, carName, false, true) end Edited March 14, 2014 by Guest Datastore - Store data to a database quickly. (Useful for saving scripted tables)
DNL291 Posted March 14, 2014 Posted March 14, 2014 You've putted the syntax arguments incorrect. guiGridListSetItemText(CarSpawner_Gridlist, row, 1, "-", false, true) guiGridListSetItemText(CarSpawner_Gridlist, row, 2, carName, false, true) Please do not PM me with scripting related question nor support, use the forums instead.
justn Posted March 14, 2014 Author Posted March 14, 2014 Thanks man ! Works great. Datastore - Store data to a database quickly. (Useful for saving scripted tables)
DNL291 Posted March 14, 2014 Posted March 14, 2014 You're welcome. Please do not PM me with scripting related question nor support, use the forums instead.
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