Jump to content

problem


cuervox123

Recommended Posts

Posted

hello, I have a problem

I want to trigger the file s to put text in mainMemo

Here the code

S:

function lo2() 
local mainMemo = executeSQLQuery("SELECT * FROM Info where info = ''") 
informacion2 = mainMemo["info"] 
triggerClientEvent (source, "viendoinfo", source, informacion2)  
end 
addEvent ("infl", true) 
addEventHandler ("infl", root, lo2)  

C:

logininfo = guiCreateWindow(0.268, 0.3049, 0.4258, 0.4812, "Informacion del Login", true) 
mainMemo = guiCreateMemo(0.0165, 0.0519, 0.967, 0.8571, "", true, logininfo) 
acces = guiCreateButton(0.0165, 0.9091, 0.4844, 0.0675, "Actualizar la Informacion.", true, logininfo) 
closeed = guiCreateButton(0.5193, 0.9091, 0.4642, 0.0675, "Cerrar", true, logininfo) 
guiSetVisible(logininfo, false) 
guiWindowSetSizable(logininfo, false) 
  
function viendoinfo(i) 
  guiSetVisible(logininfo, true) 
  guiSetInputEnabled(true) 
  guiBringToFront(logininfo) 
  showCursor(true) 
  guiSetText(mainMemo, i) 
end 
addEvent("viendoinfo", true) 
addEventHandler("viendoinfo", root, viendoinfo) 
  
function loprimero() 
guiSetInputEnabled(true) 
triggerServerEvent("infl", localPlayer) 
end 
addEventHandler("onClientGUIClick", infologinbuton, loprimero, false) 

Posted

Returns of executeSQLQuery()

Returns a table with the result of the query if it was a SELECT query, or false if otherwise. In case of a SELECT query the result table may be empty (if there are no result rows). The table is of the form:

{

{ colname1=value1, colname2=value2, ... },

{ colname1=value3, colname2=value4, ... },

...

}

function lo2() 
local mainMemo = executeSQLQuery("SELECT * FROM Info where info = '' LIMIT 1") 
informacion2 = mainMemo[1]["info"] 
triggerClientEvent (source, "viendoinfo", source, informacion2) 
end 
addEvent ("infl", true) 
addEventHandler ("infl", root, lo2) 

Last thing, your query is the same that

local mainMemo = "" 

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

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