Jump to content

Lloyd Logan

Members
  • Posts

    642
  • Joined

  • Last visited

Posts posted by Lloyd Logan

  1. on line 2, try chaning "GUIEditor.window[2]" to "GUIEditor.window[3]"

    and in triggerClientEvnet, you should just trigger it for the player, not all of the players.

    Thanks for the triggerClientEvent, i'll change that! But, the real problem was addEventHandler, when it should have bee addEvent!

    Oh my bad, I didn't see that error.

    Such simple things! Thanks again

  2. on line 2, try chaning "GUIEditor.window[2]" to "GUIEditor.window[3]"

    and in triggerClientEvnet, you should just trigger it for the player, not all of the players.

    Thanks for the triggerClientEvent, i'll change that! But, the real problem was addEventHandler, when it should have bee addEvent!

  3. Why does this say there is no text in the editbox even if there is?

      
    function checkRegField() 
        inputusernamereg = guiGetText(GUIEditor.edituserreg) 
        inputpasswordreg = guiGetText(GUIEditor.editpassreg) 
        if inputusernamereg or inputpasswordreg == "" then 
        guiSetVisible (GUIEditor.window[2], true ) 
         guiBringToFront ( GUIEditor.window[2] ) 
         else  
         triggerServerEvent("submitRegister", getRootElement(), inputusernamereg, inputpasswordreg) 
        end 
    end 
    

  4. Why isn't this closing the GUI?

    SERVER

    function submitReg() 
        dbExec(server, "CREATE TABLE IF NOT EXISTS accounts (accountname TEXT, password TEXT)") 
        new = dbExec(server, "INSERT INTO accounts VALUES (accountname, password)", inputusernamereg, inputpasswordreg) 
        output = outputChatBox("You have successfully created an account!") 
        if new == true then 
        triggerClientEvent("closedok", getRootElement()) 
        triggerClientEvent("onErrorok", getRootElement()) 
        end 
    end 
    addEvent( "submitRegister", true ) 
    addEventHandler( "submitRegister", root, submitReg ) 
    

    CLIENT

    function onErrorOk() 
        guiSetVisible (GUIEditor.window[2], false) 
    end 
    addEventHandler("onErrorok", true) 
    addEventHandler("onErrorok", getRootElement(), onErrorOk) 
      
      
    function closeSuccess() 
        guiSetVisible (GUIEditor.window[3], true ) 
    end 
    addEventHandler("closedok", true) 
    addEventHandler("closedok", getRootElement(), closeSuccess) 
    

    Thanks

  5. Why don't you try? Looks fine to me. BTW, I don't see any reason why you need to declare new variables if you don't even use them.

    So there isn't a need for the variable 'server'?

  6. You're right,

    how does this look?

    local user = "root" 
    local pass = "" 
    local host = "127.0.0.1" 
    local db = "servermta" 
    server = dbConnect ( "mysql", "dbname=servermta;host=127.0.0.1","root") 
      
    

  7. Hi,

    why isn't this working, it's saying access denied for user

    local user = "root" 
    local pass = "" 
    local host = "127.0.0.1" 
    local db = "accounts" 
    server = dbConnect ( "mysql", "dbname=accounts;host=127.0.0.1") 
      
      
    

    Thanks

  8. Hey,

    So from my experience with Java, if a field is empty it equals to

    null 
    

    .

    So, if I want to check if an edit box has no letters/words in it, how would i go about it? So far i got;

    function checkRegField() 
        inputusername = guiGetText(editusername) 
        if inputusername == "" then 
        guiSetVisible (GUIEditor.window[2], not guiGetVisible ( GUIEditor.window[2] ) ) 
        end 
    end 
    

    Thanks

    Lloyd

  9. Updated computers can't be compared to those from six months ago. Technology is changing so fast, before you know we're able to run servers on computers the size of your ID. I'm not trying to be butthurt but wont this affect your internet aswel ?

    Nah, my Internet is fine.

  10. i am creating my first script and i got a problem i scripted a gui appears when i hit the marker and its appear and scripted the exit button and it hide the gui but when i hit the marker again it doesn't appear again unless i restart the resource .....Help please

    Could you either, post your code here, or PM it to me!

  11. The Algerian & Tunisian not arabic language.

    But he said who know for SQL

    I will go now, but I didn't know that language had numbers in it?

    Not really, some words that WE have doesn't exist at the English/latin alphabet, so we use numbers instead.

    Aha, you learn something new everyday! Oh, better get out of this section! Before i am حذر

×
×
  • Create New...