Sergioks Posted August 4, 2014 Share Posted August 4, 2014 (edited) Buenas, estoy tratando de hacer un sistema de clanes, ya lo tengo casi terminado, exceptuando que me falta el sistema de "log".. hice algo asi, pero no funciona. alguna sugerencia de que puede estar mal? DebugString: [color=#F09400]WARNING: Clan-System:662: Bad argument @ guiGridListSetItemText [expected string at argument 4, got table][/color] Server-Side: addEvent("mostrarLog", true) function showGangLog( theGangName ) local theGangLogTable = {} local theLog = executeSQLQuery("SELECT Log FROM theGangLog WHERE NameGroup=?", theGangName) -------------------------------"SELECT * FROM punishments WHERE serial=? if (not theLog) then return end for i=1, #theLog do theGangLogTable[i] = theLog[i] end triggerClientEvent(source, "setGangLog", source, theGangLogTable ) theGangLogTable = {} end addEventHandler("mostrarLog", root, showGangLog ) Client-Side: addEvent("setGangLog", true) addEventHandler("setGangLog", root, function(theGangLogTable) guiGridListClear(LogGridList) --- Column: theLogColumn for i=1, #theGangLogTable do local row = guiGridListAddRow(LogGridList) guiGridListSetItemText(LogGridList, row, theLogColumn, theGangLogTable[i], false, false) --- LINEA #662 end end) es mi primera vez haciendo una cosa asi, por eso pido ayuda en este asunto. - Gracias de Antemano. Edited August 4, 2014 by Guest Link to comment
RottenFlesh Posted August 4, 2014 Share Posted August 4, 2014 addEvent("mostrarLog", true) function showGangLog( theGangName ) local theGangLogTable = {} local theLog = executeSQLQuery("SELECT Log FROM theGangLog WHERE NameGroup=?", theGangName) -------------------------------"SELECT * FROM punishments WHERE serial=? if (not theLog) then return end for i, log in ipairs(theLog) do theGangLogTable[i] = log["Log"] end triggerClientEvent(source, "setGangLog", source, theGangLogTable ) theGangLogTable = {} end addEventHandler("mostrarLog", root, showGangLog ) Dime si te funciona esto. Link to comment
Sergioks Posted August 4, 2014 Author Share Posted August 4, 2014 addEvent("mostrarLog", true) function showGangLog( theGangName ) local theGangLogTable = {} local theLog = executeSQLQuery("SELECT Log FROM theGangLog WHERE NameGroup=?", theGangName) -------------------------------"SELECT * FROM punishments WHERE serial=? if (not theLog) then return end for i, log in ipairs(theLog) do theGangLogTable[i] = log["Log"] end triggerClientEvent(source, "setGangLog", source, theGangLogTable ) theGangLogTable = {} end addEventHandler("mostrarLog", root, showGangLog ) Dime si te funciona esto. muchas gracias, me funciono Link to comment
Recommended Posts