[Ajuda] registro
#1

desculpe pelo 2 є poste , eu tenho um antigo sistema de registro e tentei passar ele pra dof2 que nem fica os comandos em zcmd mas ta dificil aqui eu ainda to acabando mais presciso de ajuda vlw

pawn Код:
public OnPlayerRequestClass(playerid, classid)
{
    new aname[MAX_PLAYER_NAME];//5000, 0
 //linha 91/*   format(file, sizeof(file), P_CONTAS, aname);//defino aqui aonde o a conta do player
    SetPlayerSkin(playerid,dini_Int(file, "Skin"));
    PlayerInfo[playerid][Logado] = 0;
    SetPlayerInterior(playerid, 0);
   
    SetPlayerPos(playerid,2128.0952,35.1667,39.1944);
    SetPlayerCameraPos(playerid,2106.9905,35.4213,35.5485);
    SetPlayerCameraLookAt(playerid,2128.0952,35.1667,39.1944);
    SetPlayerFacingAngle(playerid, 85.0331);
    SetPlayerInterior(playerid, 0);
    GetPlayerName(playerid, aname, sizeof(aname));
    if(PlayerInfo[playerid][Logado] == 0)
    {
        dini_Exists             DOF2_FileExists
        {
            format(STRX, sizeof(STRX), "Usuбrio: %s\nInsira uma senha:", aname);
            ShowPlayerDialog(playerid, REGISTRO, DIALOG_STYLE_PASSWORD, "Registrar", STRX, "Registrar", "Sair");
            SetPlayerSkin(playerid, 4);
        }
        dini_Exists             DOF2_FileExists
        {
            format(STRX, sizeof(STRX), "Usuбrio: %s\nInsira sua senha:", aname);
            ShowPlayerDialog(playerid, LOGIN, DIALOG_STYLE_PASSWORD, "Logar", STRX, "Logar", "Sair");
        }
    }
    else {
        SendClientMessage(playerid, Vermelho, "| KICK | Vocк foi kickado(a) por nгo se registrar / logar");
        Kick(playerid);
    }
    return 1;
}
eos erros
pawn Код:
C:\Users\pppp\Desktop\Iniodo0RPG\gamemodes\RPG.pwn(91) : error 017: undefined symbol "file"
C:\Users\pppp\Desktop\Iniodo0RPG\gamemodes\RPG.pwn(91) : error 017: undefined symbol "file"
C:\Users\pppp\Desktop\Iniodo0RPG\gamemodes\RPG.pwn(91) : error 029: invalid expression, assumed zero
C:\Users\pppp\Desktop\Iniodo0RPG\gamemodes\RPG.pwn(91) : fatal error 107: too many error messages on one line

Compilation aborted.Pawn compiler 3.2.3664          Copyright (c) 1997-2006, ITB CompuPhase

4 Errors.
Reply
#2

pawn Код:
public OnPlayerRequestClass(playerid, classid)
{
    new aname[MAX_PLAYER_NAME];//5000, 0
    format(file, sizeof(file), P_CONTAS, aname);
    SetPlayerSkin(playerid,dini_Int(file, "Skin"));
    PlayerInfo[playerid][Logado] = 0;
    SetPlayerInterior(playerid, 0);
   
    SetPlayerPos(playerid,2128.0952,35.1667,39.1944);
    SetPlayerCameraPos(playerid,2106.9905,35.4213,35.5485);
    SetPlayerCameraLookAt(playerid,2128.0952,35.1667,39.1944);
    SetPlayerFacingAngle(playerid, 85.0331);
    SetPlayerInterior(playerid, 0);
    GetPlayerName(playerid, aname, sizeof(aname));
    if(PlayerInfo[playerid][Logado] == 0)
    {
        dini_Exists             DOF2_FileExists
        {
            format(STRX, sizeof(STRX), "Usuбrio: %s\nInsira uma senha:", aname);
            ShowPlayerDialog(playerid, REGISTRO, DIALOG_STYLE_PASSWORD, "Registrar", STRX, "Registrar", "Sair");
            SetPlayerSkin(playerid, 4);
        }
        dini_Exists             DOF2_FileExists
        {
            format(STRX, sizeof(STRX), "Usuбrio: %s\nInsira sua senha:", aname);
            ShowPlayerDialog(playerid, LOGIN, DIALOG_STYLE_PASSWORD, "Logar", STRX, "Logar", "Sair");
        }
    }
    else {
        SendClientMessage(playerid, Vermelho, "| KICK | Vocк foi kickado(a) por nгo se registrar / logar");
        Kick(playerid);
    }
    return 1;
}
Reply
#3

pawn Код:
C:\Users\pppp\Desktop\Iniodo0RPG\gamemodes\RPG.pwn(91) : error 017: undefined symbol "file"
C:\Users\pppp\Desktop\Iniodo0RPG\gamemodes\RPG.pwn(91) : error 017: undefined symbol "file"
C:\Users\pppp\Desktop\Iniodo0RPG\gamemodes\RPG.pwn(91) : error 029: invalid expression, assumed zero
C:\Users\pppp\Desktop\Iniodo0RPG\gamemodes\RPG.pwn(91) : fatal error 107: too many error messages on one line

Compilation aborted.Pawn compiler 3.2.3664          Copyright (c) 1997-2006, ITB CompuPhase

4 Errors.
pawn Код:
format(file, sizeof(file), P_CONTAS, aname);
eu ja tentei retirar essa linha mais dai da 5 erros diferente que eu posso tentar arrumar
Reply
#4

Tire a linha, compile e poste os erros aqui.
Reply
#5

delete eu arrumei os erros do file e agr da esses

pawn Код:
#include <a_samp>
#include <zcmd>
#include <sscanf2>


C:\Users\pppp\Desktop\Iniodo0RPG\gamemodes\RPG.pwn(112) : error 017: undefined symbol "dini_Exists"
C:\Users\pppp\Desktop\Iniodo0RPG\gamemodes\RPG.pwn(118) : warning 217: loose indentation
C:\Users\pppp\Desktop\Iniodo0RPG\gamemodes\RPG.pwn(118) : error 017: undefined symbol "dini_Exists"
C:\Users\pppp\Desktop\Iniodo0RPG\gamemodes\RPG.pwn(509) : warning 203: symbol is never used: "news"
Pawn compiler 3.2.3664          Copyright (c) 1997-2006, ITB CompuPhase


2 Errors.
eu mudei isso pra DOF2 tbm so que da o mesmo erro -.-'
Reply
#6

Quote:
Originally Posted by Standby
Посмотреть сообщение
delete eu arrumei os erros do file e agr da esses

pawn Код:
#include <a_samp>
#include <zcmd>
#include <sscanf2>


C:\Users\pppp\Desktop\Iniodo0RPG\gamemodes\RPG.pwn(112) : error 017: undefined symbol "dini_Exists"
C:\Users\pppp\Desktop\Iniodo0RPG\gamemodes\RPG.pwn(118) : warning 217: loose indentation
C:\Users\pppp\Desktop\Iniodo0RPG\gamemodes\RPG.pwn(118) : error 017: undefined symbol "dini_Exists"
C:\Users\pppp\Desktop\Iniodo0RPG\gamemodes\RPG.pwn(509) : warning 203: symbol is never used: "news"
Pawn compiler 3.2.3664          Copyright (c) 1997-2006, ITB CompuPhase


2 Errors.
eu mudei isso pra DOF2 tbm so que da o mesmo erro -.-'
Vocк excluiu os dini_Exists ?? Delete eles ou Substitua por DOF2_FileExists
Reply
#7

sim eu subistituio pelo dof2 mais aparece

pawn Код:
error 017: undefined symbol "DOF2_FileExists
eu nгo tenho a include DOF2 se vocк me passar agradeзo , aqui tudo em zcmd sera que nгo tem perigo de usar dini? em vez de DOF2
Reply
#8

Download ZCMD: http://www.sendspace.com/file/27x76y

Download DOF2: http://www.sendspace.com/file/yk4vfh

Conversor de Dini para DOF2 : https://sampforum.blast.hk/showthread.php?tid=383377

Espero ter ajudado

Quanto aos erros de "undefined symbol "file"" coloque antes "new file[56];"

@EDIT

Ou tente colocar assim:

Код:
public OnPlayerRequestClass(playerid, classid)
{
    new aname[MAX_PLAYER_NAME], file[56], STRX[256];//5000, 0
	format(file, sizeof(file), P_CONTAS, aname);//defino aqui aonde o a conta do player
    SetPlayerSkin(playerid,DOF2_GetInt(file, "Skin"));
    PlayerInfo[playerid][Logado] = 0;
    SetPlayerInterior(playerid, 0);
    SetPlayerPos(playerid,2128.0952,35.1667,39.1944);
    SetPlayerCameraPos(playerid,2106.9905,35.4213,35.5485);
    SetPlayerCameraLookAt(playerid,2128.0952,35.1667,39.1944);
    SetPlayerFacingAngle(playerid, 85.0331);
    SetPlayerInterior(playerid, 0);
    GetPlayerName(playerid, aname, sizeof(aname));
    if(PlayerInfo[playerid][Logado] == 0)
    {
        if(!DOF2_FileExists(file))
        {
            format(STRX, sizeof(STRX), "Usuбrio: %s\nInsira uma senha:", aname);
            ShowPlayerDialog(playerid, REGISTRO, DIALOG_STYLE_PASSWORD, "Registrar", STRX, "Registrar", "Sair");
            SetPlayerSkin(playerid, 4);
        }
         if(DOF2_FileExists(file))
        {
            format(STRX, sizeof(STRX), "Usuбrio: %s\nInsira sua senha:", aname);
            ShowPlayerDialog(playerid, LOGIN, DIALOG_STYLE_PASSWORD, "Logar", STRX, "Logar", "Sair");
        }
    }
    else
	{
        SendClientMessage(playerid, Vermelho, "| KICK | Vocк foi kickado(a) por nгo se registrar / logar");
        Kick(playerid);
    }
    return 1;
}
Nгo esqueзa de definir o P_CONTAS !
Reply
#9

mano oq e esse warning

pawn Код:
#include <DOF2>

C:\Users\pppp\Desktop\Iniodo0RPG\gamemodes\RPG.pwn(490) : warning 203: symbol is never used: "DOF2_Exit"
Pawn compiler 3.2.3664          Copyright (c) 1997-2006, ITB CompuPhase


1 Warning.
linha 490 mais aqui nгo tem so vai ate a linha 489
Reply
#10

No

OngamemodeExit, adicione essa linha

PHP код:
DOF2_Exit(); 
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)