UserToDelete Posted March 8, 2015 Posted March 8, 2015 (edited) Estaba realizando un panel de usuario en guiEditor y me vi en la obligacion de modificarlo manualmente, al volver a abrirlo me encuentro con esto; attempt to index field 'secret2' (a userdata value) Linea problematica en cuestion (Segun el error) secret.secret2.secret4= guiCreateTab("Player Information", secret.secret2) A donde hace referencia: secret.secret2= guiCreateTabPanel(10, 27, 541, 299, false, secret.secret3) secret.secret3= guiCreateWindow((screenW - 561) / 2, (screenH - 380) / 2, 561, 380, "=== Userpanel === [API] From vCore", false) Y las tablas son estas: secret = { secretNoImporta = {}, secret2 = { secret4 = {}, secretNoImporta1 = { secretNoImporta2 = {} } } } Edited March 8, 2015 by Guest
Castillo Posted March 8, 2015 Posted March 8, 2015 · Hidden Hidden secret.secret2= guiCreateTabPanel(10, 27, 541, 299, false, secret.secret3) Al hacer eso, estas cambiando tu tabla por un elemento ( userdata ), por eso el error. Tendrias que hacer algo asi: secret.secret2.tabPanel = guiCreateTabPanel(10, 27, 541, 299, false, secret.secret3)
UserToDelete Posted March 8, 2015 Author Posted March 8, 2015 Entonces he hecho todo un script de 80 lineas mal, mejor lo dejo con variantes normalitas. Hay que ver.. guiEditor no funciona bien !!
Castillo Posted March 8, 2015 Posted March 8, 2015 · Hidden Hidden Si que funciona bien, obviamente no entendiste como lo hace, asi de simple. GUIEditor = { window = {}, gridlist = {} } addEventHandler("onClientResourceStart", resourceRoot, function() GUIEditor.window[1] = guiCreateWindow(0.28, 0.20, 0.38, 0.43, "NOTHING", true) guiWindowSetSizable(GUIEditor.window[1], false) GUIEditor.gridlist[1] = guiCreateGridList(0.01, 0.05, 0.34, 0.86, true, GUIEditor.window[1]) guiGridListAddColumn(GUIEditor.gridlist[1], "", 0.9) end ) Este es el formato que usa el guieditor, como ves, usa una tabla con otras tablas dentro, y luego asigna un numero a cada elemento, no hace lo que vos hiciste.
UserToDelete Posted March 8, 2015 Author Posted March 8, 2015 Ahora entendi, El error es la variante dentro de la tabla, que podia ser .tabPanel o [1]. Ty Castillo~
Recommended Posts