Jump to content

Esto esta mal o yo hago algo mal


Arsilex

Recommended Posts

Posted

Bueno pues que ando creando una cosita y me da un error que no deberia de dar bueno aqui esta la linea donde da el error

function reg(ID, pass) 
local ID = tostring(ID) 
local pass = tostring(pass) 
local anadida = addAccount(ID,pass) 
    if anadida then 
        triggerClientEvent ( "onRegistrado", getRootElement() ) 
    else 
        triggerClientEvent ( "onNoRegistrado", getRootElement() ) 
    end 
end 
addEvent( "onRegister", true ) 
addEventHandler( "onRegister", getRootElement(), reg ) 

por lo que dices es que le sobra o le falta un end a la linea 1 ._.

["end" exported near "eof"]

rsilex.png.0e6ad382b3fdc3cbe6390e3e847572c9.png
Posted

Creo que le falta un end

function reg(ID, pass) 
local ID = tostring(ID) 
local pass = tostring(pass) 
local anadida = addAccount(ID,pass) 
    if anadida then 
        triggerClientEvent ( "onRegistrado", getRootElement() ) 
    else 
        triggerClientEvent ( "onNoRegistrado", getRootElement() ) 
    end 
end 
end 
addEvent( "onRegister", true ) 
addEventHandler( "onRegister", getRootElement(), reg ) 

bandera_de_Venezuela.png

Posted

No le falta anda, deberia funcionar, estas seguro de que es en esa funcion?

P.D: Deberias enviar el trigger para el jugador que se registro nada mas.

function reg ( ID, pass ) 
    local ID = tostring ( ID ) 
    local pass = tostring ( pass ) 
    local anadida = addAccount ( ID, pass ) 
    if ( anadida ) then 
        triggerClientEvent ( source, "onRegistrado", getRootElement() ) 
    else 
        triggerClientEvent ( source, "onNoRegistrado", getRootElement() ) 
    end 
end 
addEvent ( "onRegister", true ) 
addEventHandler ( "onRegister", getRootElement(), reg ) 

San Andreas Utopia RPG (SAUR) Owner & Developer.

560x95_FFFFFF_FF9900_000000_000000.png

Education is the most powerful weapon which you can use to change the world.

Posted
function Registrar() 
local login = guiGetText (EditLog) 
local pass = guiGetText (EditPass) 
    if login == "" or pass == "" then 
        if Idioma == "ES" then 
            guiSetText(Info, "Tienes que poner nombre de usuario y contrasena") 
        elseif Idioma == "EN" then 
            guiSetText(Info, "You need put your pass and username") 
        elseif Idioma == "RU" then 
            guiSetText(Info, "Вы должны поставить имя пользователя и пароль") 
        end 
    elseif login ~= "" and pass ~= "" then 
        guiSetText(Info, "Wait 3 Seconds") 
        triggerServerEvent ( "onRegister", localPlayer, login, pass )  
    end 
end 

este es el trigger

rsilex.png.0e6ad382b3fdc3cbe6390e3e847572c9.png
Posted

No tiene nada mal ese script tampoco.

San Andreas Utopia RPG (SAUR) Owner & Developer.

560x95_FFFFFF_FF9900_000000_000000.png

Education is the most powerful weapon which you can use to change the world.

Posted

Enviame todo el server side por PM.

San Andreas Utopia RPG (SAUR) Owner & Developer.

560x95_FFFFFF_FF9900_000000_000000.png

Education is the most powerful weapon which you can use to change the world.

  • Recently Browsing   0 members

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