Jump to content

bad Argument xmlSaveFile :/


iFoReX

Recommended Posts

what argument I need put in my xmlSaveFile ? I done it.

cl-side

label = {} 
  
RGUI = guiCreateWindow(0.3703,0.3503,0.2914,0.2695,"Register Panel",true) 
guiWindowSetMovable(RGUI,false) 
guiWindowSetSizable(RGUI,false) 
label[1] = guiCreateLabel(25,47,317,20,"Registrate ya !, asi guardaras datos y todo eso...",false,RGUI) 
guiSetFont(label[1],"clear-normal") 
EPassword = guiCreateEdit(21,91,155,32,"",false,RGUI) 
Registrarme = guiCreateButton(181,90,92,32,"Registrarme !",false,RGUI) 
label[2] = guiCreateLabel(63,124,76,17,"CONTRASEÑA",false,RGUI) 
guiSetFont(label[2],"default-bold-small") 
label[3] = guiCreateLabel(15,149,183,21,"Ve ya a nuestro nuevo Foro ! ...",false,RGUI) 
label[4] = guiCreateLabel(107,174,171,18,"http://bhzserver.forochile.com",false,RGUI) 
  
guiSetVisible(RGUI,false) 
showCursor(false) 
  
addEventHandler("onClientResourceStart",getResourceRootElement(getThisResource()), 
function() 
guiSetVisible(RGUI,true) 
showCursor(true) 
end 
) 
  
function clientSubmitaccount ( button, state ) 
    if ( button == "left" and state == "up" ) then 
        local username = getPlayerName( getLocalPlayer() ) 
        local password = guiGetText(EPassword) 
        if ( username and password ) then 
            triggerServerEvent("cuenta", localPlayer, username, password) 
        else 
           outputChatBox("Porfavor pon tu Nick y tu Contraseña.") 
        end 
    end 
end 
addEventHandler("onClientGUIClick", Registrarme, clientSubmitaccount, false) 
  
addEvent ( "closeLoginGUI", true ) 
addEventHandler ( "closeLoginGUI", root, 
    function ( ) 
       guiSetVisible ( RGUI, false ) 
       showCursor ( false ) 
    end 
) 

sv-side

addEvent("cuenta", true) 
addEventHandler("cuenta", root,  
function ( username, password ) 
    if ( password ~= "" and password ~= nil and username ~= "" and username ~= nil ) then 
        if ( not getAccount ( username ) ) then 
            local accountAdded = addAccount ( username, password ) 
            if ( accountAdded ) then 
                outputChatBox ( "Gracias " .. getPlayerName ( source ) .. ", Ya estas Registrado ahora loggeate", source ) 
                local character = xmlCreateFile(""..username..".xml",username) 
                xmlSaveFile(character) 
                if ( character ) then 
                outputChatBox ( "Tu Character se a creado con exito !.", source ) 
                triggerClientEvent ( source, "closeLoginGUI", source ) 
                end 
            else 
                outputChatBox ( "Error creando la Cuenta por Favor contacta a un Admin.", source ) 
            end 
        else 
            outputChatBox ( "Esta Cuenta Ya Existe..", source ) 
        end 
    else 
        outputChatBox ( "Porfavor Pon tus datos Correctos.", source ) 
    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...