manve1 Posted October 17, 2012 Posted October 17, 2012 I need help for my script, i know i done the tonumber bit, but i don't know how to make that i get the text from table, i tried using guiGridListGetItemText, but didn't work. hWnd_Commands = guiCreateWindow( 0.2, 0.2, 0.6, 0.6, "Admin Commands", true ) hGrid_Admin = guiCreateGridList( 0.1, 0.1, 0.8, 0.6, true, hWnd_Commands ) local hGrid_Row_Admin = nil; hColumn_Admin1 = guiGridListAddColumn( hGrid_Admin, "Command", 0.4 ) hColumn_Admin2 = guiGridListAddColumn( hGrid_Admin, "Effect", 0.4 ) hColumn_Admin3 = guiGridListAddColumn( hGrid_Admin, "Additional Info", 0.4 ) local hAdmin_Commands = { 'kill "name"'; } for v in next, hAdmin_Commands do local hGrid_Row_Admin1 = guiGridListAddRow(hGrid_Admin) guiGridListSetItemText(hGrid_Admin, hGrid_Row_Admin1, hColumn_Admin1, tonumber(v), false, false) end Looking for tutorials or information? check out: www.simpleask.co.uk
Castillo Posted October 17, 2012 Posted October 17, 2012 Gridlists can't have numbers as row text. San Andreas Utopia RPG (SAUR) Owner & Developer. Education is the most powerful weapon which you can use to change the world.
manve1 Posted October 17, 2012 Author Posted October 17, 2012 i don't know how to change it so it has text from the table and thx for the pointing out Looking for tutorials or information? check out: www.simpleask.co.uk
Castillo Posted October 17, 2012 Posted October 17, 2012 hWnd_Commands = guiCreateWindow( 0.2, 0.2, 0.6, 0.6, "Admin Commands", true ) hGrid_Admin = guiCreateGridList( 0.1, 0.1, 0.8, 0.6, true, hWnd_Commands ) local hGrid_Row_Admin = nil; hColumn_Admin1 = guiGridListAddColumn( hGrid_Admin, "Command", 0.4 ) hColumn_Admin2 = guiGridListAddColumn( hGrid_Admin, "Effect", 0.4 ) hColumn_Admin3 = guiGridListAddColumn( hGrid_Admin, "Additional Info", 0.4 ) local hAdmin_Commands = { 'kill "name"'; } for _, cmd in ipairs ( hAdmin_Commands ) do local hGrid_Row_Admin1 = guiGridListAddRow(hGrid_Admin) guiGridListSetItemText(hGrid_Admin, hGrid_Row_Admin1, hColumn_Admin1, cmd, false, false) end San Andreas Utopia RPG (SAUR) Owner & Developer. Education is the most powerful weapon which you can use to change the world.
manve1 Posted October 17, 2012 Author Posted October 17, 2012 thank you. Looking for tutorials or information? check out: www.simpleask.co.uk
Castillo Posted October 17, 2012 Posted October 17, 2012 You're welcome. San Andreas Utopia RPG (SAUR) Owner & Developer. Education is the most powerful weapon which you can use to change the world.
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