SA-MP Forums Archive
[Duda] Error en sistema de registro - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: Non-English (https://sampforum.blast.hk/forumdisplay.php?fid=9)
+--- Forum: Languages (https://sampforum.blast.hk/forumdisplay.php?fid=33)
+---- Forum: Español/Spanish (https://sampforum.blast.hk/forumdisplay.php?fid=29)
+---- Thread: [Duda] Error en sistema de registro (/showthread.php?tid=239376)



[Duda] Error en sistema de registro - Troka - 13.03.2011

Buenas les contare, he seguido el tutorial de brunosonico sobre como hacer un sistema de

registro y logeo con dialog, y varias veces me ha salido ahora me habia salido pero movi una cosa

y ahora me tira un error :S me dice: "undefined symbol ShowPlayerDialog" que podra ser?

PD: no pongo las lineas del error ni el error porque segun tengo entendido que eso es por un include

solamente, el problema que no se cual T.T estoy compilando con pawno de la 0.3c espero me ayuden

saludos!!


Respuesta: [Duda] Error en sistema de registro - Lunnatiicz - 13.03.2011

En quй funciуn lo tienes? Dentro de quй callback? Si no pones un code no podemos ayudarte, no somos tan magos :P


Respuesta: [Duda] Error en sistema de registro - Code8976Man - 13.03.2011

Fнjate que compilas con el pawno que tiene los includes del 0.3c. Abrelo, y abre la gm desde ahн y prueba.


Re: Respuesta: [Duda] Error en sistema de registro - Troka - 13.03.2011

Quote:
Originally Posted by Code8976Man
Посмотреть сообщение
Fнjate que compilas con el pawno que tiene los includes del 0.3c. Abrelo, y abre la gm desde ahн y prueba.
Si tambien crei que lo hacia desde otro pawno pero no ya me fije bien jeje bueno aqui les va todo lo que hago

primero pongo el include Dini de DracoBlue:

Код:
#include <Dini>
despues pongo 2 defines:

Код:
#define Registro 0
#define Ingreso 1
despues una variable:

Код:
new Identificado[MAX_PLAYERS];
en onplayerconnect pongo esto:

Код:
Identificado[playerid] = 0;
new nombre[MAX_PLAYER_NAME], archivo[256];
GetPlayerName(playerid, nombre, sizeof(nombre));
format(archivo, sizeof(archivo), "/Usuarios/%s.ini", nombre);
if (!dini_Exists(archivo))
{
    ShowPlayerDialog(playerid, Registro, DIALOG_STYLE_INPUT, "Registro", "Ingresa tu contrasсea en el siguiente campo:", "Continuar", "Cancelar");
}
else
{
    ShowPlayerDialog(playerid, Ingreso, DIALOG_STYLE_INPUT, "Ingreso", "Ingresa tu contrasсea en el siguiente campo:", "Aceptar", "Cancelar");
}
despues me voy a ondialogresponse, la public la tengo asi:

Код:
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
    return 1;
}
entre esa callback pongo esto:

Код:
if (dialogid == Registro)
{
    new nombrejugador[MAX_PLAYER_NAME], archivo[256];
    if (!strlen(inputtext)) return ShowPlayerDialog(playerid, Registro, DIALOG_STYLE_INPUT, "Registro", "Ingresa tu contrasсea en el siguiente campo:", "Continuar", "Cancelar");
    if (!response) return ShowPlayerDialog(playerid, Registro, DIALOG_STYLE_INPUT, "Registro", "Ingresa tu contrasсea en el siguiente campo:", "Continuar", "Cancelar");
    GetPlayerName(playerid, nombrejugador, sizeof(nombrejugador));
    format(archivo, sizeof(archivo), "/Usuarios/%s.ini", nombrejugador);
    dini_Create(archivo);
    dini_Set(archivo, "Usuario", nombrejugador);
    dini_Set(archivo, "Contraseсa", inputtext);
    ShowPlayerDialog(playerid, Ingreso, DIALOG_STYLE_INPUT, "Ingreso", "Ingresa tu contrasсea en el siguiente campo:", "Aceptar", "Cancelar");
}
y despues:

Код:
if (dialogid == Ingreso)
{
    new nombrejugador[MAX_PLAYER_NAME], archivo[256], comprobante[256];
    if (!strlen(inputtext)) return ShowPlayerDialog(playerid, Ingreso, DIALOG_STYLE_INPUT, "Ingreso", "Ingresa tu contrasсea en el siguiente campo:", "Aceptar", "Cancelar");
    if (!response) return ShowPlayerDialog(playerid, Ingreso, DIALOG_STYLE_INPUT, "Ingreso", "Ingresa tu contrasсea en el siguiente campo:", "Aceptar", "Cancelar");
    GetPlayerName(playerid, nombrejugador, sizeof(nombrejugador));
    format(archivo, sizeof(archivo), "/Usuarios/%s.ini", nombrejugador);
    format(comprobante, sizeof(comprobante), "%s", dini_Get(archivo, "Contraseсa"));
    if (!strcmp (inputtext, comprobante))
    {
        Identificado[playerid] = 1;
    }
    else
    {
        ShowPlayerDialog(playerid, Ingreso, DIALOG_STYLE_INPUT, "Ingreso", "Ingresa tu contrasсea en el siguiente campo:", "Aceptar", "Cancelar");
    }
}
y listo es todo espero puedan ayudarme de antemano gracias


Respuesta: [Duda] Error en sistema de registro - Lunnatiicz - 13.03.2011

En todo te da error? Oh sуlo especнficamente un script?


Re: [Duda] Error en sistema de registro - Troka - 13.03.2011

Errores:

Код:
C:\Troka\GM Xchel\Server convertido a 3.C\samp03csvr_win32\gamemodes\Roleplay.pwn(79) : error 017: undefined symbol "ShowPlayerDialog"
C:\Troka\GM Xchel\Server convertido a 3.C\samp03csvr_win32\gamemodes\Roleplay.pwn(83) : error 017: undefined symbol "ShowPlayerDialog"
C:\Troka\GM Xchel\Server convertido a 3.C\samp03csvr_win32\gamemodes\Roleplay.pwn(327) : error 025: function heading differs from prototype
C:\Troka\GM Xchel\Server convertido a 3.C\samp03csvr_win32\gamemodes\Roleplay.pwn(332) : error 017: undefined symbol "ShowPlayerDialog"
C:\Troka\GM Xchel\Server convertido a 3.C\samp03csvr_win32\gamemodes\Roleplay.pwn(333) : error 017: undefined symbol "ShowPlayerDialog"
C:\Troka\GM Xchel\Server convertido a 3.C\samp03csvr_win32\gamemodes\Roleplay.pwn(339) : error 017: undefined symbol "ShowPlayerDialog"
C:\Troka\GM Xchel\Server convertido a 3.C\samp03csvr_win32\gamemodes\Roleplay.pwn(345) : error 017: undefined symbol "ShowPlayerDialog"
C:\Troka\GM Xchel\Server convertido a 3.C\samp03csvr_win32\gamemodes\Roleplay.pwn(346) : error 017: undefined symbol "ShowPlayerDialog"
C:\Troka\GM Xchel\Server convertido a 3.C\samp03csvr_win32\gamemodes\Roleplay.pwn(356) : error 017: undefined symbol "ShowPlayerDialog"
Lines de errores:

Код:
ShowPlayerDialog(playerid, Registro, DIALOG_STYLE_INPUT, "Registro", "Ingresa tu contrasсea en el siguiente campo:", "Continuar", "Cancelar");
Код:
ShowPlayerDialog(playerid, Registro, DIALOG_STYLE_INPUT, "Registro", "Ingresa tu contrasсea en el siguiente campo:", "Continuar", "Cancelar");
Код:
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
Код:
if (!strlen(inputtext)) return ShowPlayerDialog(playerid, Registro, DIALOG_STYLE_INPUT, "Registro", "Ingresa tu contrasсea en el siguiente campo:", "Continuar", "Cancelar");
Код:
if (!response) return ShowPlayerDialog(playerid, Registro, DIALOG_STYLE_INPUT, "Registro", "Ingresa tu contrasсea en el siguiente campo:", "Continuar", "Cancelar");
Код:
ShowPlayerDialog(playerid, Ingreso, DIALOG_STYLE_INPUT, "Ingreso", "Ingresa tu contrasсea en el siguiente campo:", "Aceptar", "Cancelar");
Код:
if (!strlen(inputtext)) return ShowPlayerDialog(playerid, Ingreso, DIALOG_STYLE_INPUT, "Ingreso", "Ingresa tu contrasсea en el siguiente campo:", "Aceptar", "Cancelar");
    if (!response) return ShowPlayerDialog(playerid, Ingreso, DIALOG_STYLE_INPUT, "Ingreso", "Ingresa tu contrasсea en el siguiente campo:", "Aceptar", "Cancelar");
Код:
ShowPlayerDialog(playerid, Ingreso, DIALOG_STYLE_INPUT, "Ingreso", "Ingresa tu contrasсea en el siguiente campo:", "Aceptar", "Cancelar");
como puedes ver la mayoria son debido a ShowPlayerDialog de nuevo gracias por la ayuda saludos!!


Respuesta: [Duda] Error en sistema de registro - Lunnatiicz - 13.03.2011

Lo primero en que callback esta?

Colуcalo en OnPlayerSpawn todo lo que no sea de OnDialogResponse


Respuesta: [Duda] Error en sistema de registro - Code8976Man - 13.03.2011

Tienes el #include <a_samp> no?


Re: Respuesta: [Duda] Error en sistema de registro - Troka - 13.03.2011

Quote:
Originally Posted by Code8976Man
Посмотреть сообщение
Tienes el #include <a_samp> no?
Si

mm poner todo lo de onplayerconnect en onplayerspawn? O.o ok lo hare


Respuesta: [Duda] Error en sistema de registro - TheChaoz - 13.03.2011

como abris el archivo?