#Paper Posted April 26, 2011 Share Posted April 26, 2011 The forCicles() return stranges content (table: 11VBBA201R or similiar) questList = { {"Car Stealer", "Stole 1 car", 1, 200}, {"Bike Stealer", "Stole 1 bike", 1, 200}, {"Killing <3", "Kill 10 peds", 1, 500}, {"Killing FTW!", "Kill 100 peds", 1, 800}, {"Killing 4 life", "Kill 1000 peds", 2, 1000}, {"I <3 this server", "Reconnect!", 1, 10}, --{"I really <3 this server!", "Bring 5 players", 5, 5000}, {"Medal Man", "Get 50 medals!", 0, 0}, } function forCicles() guiGridListClear (GUIEditor_Grid[1]) for name,desc,medals,cash in ipairs(questList) do row = guiGridListAddRow ( GUIEditor_Grid[1] ) guiGridListSetItemText ( GUIEditor_Grid[1], row, qName, tostring(name), false, false ) guiGridListSetItemText ( GUIEditor_Grid[1], row, qDesc, tostring(desc), false, false ) guiGridListSetItemText ( GUIEditor_Grid[1], row, qMedals, medals, false, true ) guiGridListSetItemText ( GUIEditor_Grid[1], row, qCash, cash, false, true ) guiGridListAutoSizeColumn( GUIEditor_Grid[1], qName ) guiGridListAutoSizeColumn( GUIEditor_Grid[1], qDesc ) guiGridListAutoSizeColumn( GUIEditor_Grid[1], qMedals ) guiGridListAutoSizeColumn( GUIEditor_Grid[1], qCash ) end end Link to comment
Antibird Posted April 26, 2011 Share Posted April 26, 2011 for name,desc,medals,cash in ipairs(questList) do Errm, you confuse me. Is there something I don't know about ipairs() ... =/ I guess "name" is integer and "desc" is "userdata: table:someHexNumber" in your case. Should be like: function forCicles() guiGridListClear (GUIEditor_Grid[1]) for _, v in ipairs(questList) do row = guiGridListAddRow ( GUIEditor_Grid[1] ) guiGridListSetItemText ( GUIEditor_Grid[1], row, qName, tostring(v[1]), false, false ) guiGridListSetItemText ( GUIEditor_Grid[1], row, qDesc, tostring(v[2]), false, false ) guiGridListSetItemText ( GUIEditor_Grid[1], row, qMedals, v[3], false, true ) guiGridListSetItemText ( GUIEditor_Grid[1], row, qCash, v[4], false, true ) --// etc end end 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