Jump to content

Editbox


Lloyd Logan

Recommended Posts

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 

Link to comment

Try this:

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

Link to comment

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...