Jump to content

[SOLUCIONADO] - Que sucede aqui? - Bases de Datos


Sergioks

Recommended Posts

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 by Guest
Link to comment
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
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 :D

Link to comment
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...