[Ajuda] Login/registro
#1

Boa noite, eu estava fazendo um sistema de registro/login quando chegou na parte de clicar nas textdraws(OnPlayerClickTextDraw) eu fiz uma verificaзгo para ver se ele jб tinha conta porem esta dando erro e nao consigo resolver =(
Codigo:
Код:
public OnPlayerClickTextDraw(playerid, Text:clickedid)
{
    if(clickedid == WELCOME[11])
    {
		format(Arquivo, sizeof(Arquivo), pCONTAS, pName(playerid));
		if (!DOF2_FileExists(Arquivo)) return SendClientMessage(playerid, 0xFF0000AA, "Vocк nгo possui uma conta, se registre para logar.");
  		format(Gstring, sizeof(Gstring), "{00FF00}Seja bem vindo {FFFFFF}%s\nLoge-se para poder jogar\nInforme sua senha de login\n", pName(playerid));
		ShowPlayerDialog(playerid, LOGANDO, DIALOG_STYLE_PASSWORD, "----------LOGIN----------", Gstring, "Logar", "Sair");
    }
    if(clickedid == WELCOME[20])
    {
		format(Arquivo, sizeof(Arquivo), pCONTAS, pName(playerid));
		if (DOF2_FileExists(Arquivo)) return SendClientMessage(playerid, 0xFF0000AA, "Vocк jб possui uma conta, logue-se para entrar no servidor.");
  		format(Gstring, sizeof(Gstring), "{00FF00}Seja bem vindo.{FFFFFF}%s\nVocк nгo possui uma conta.\nNos informe uma senha, Para se Registrar.\n", pName(playerid));
		ShowPlayerDialog(playerid, REGISTRANDO, DIALOG_STYLE_PASSWORD, "----------REGISTRO----------", Gstring, "Registrar", "Sair");
    }
    return 1;
}
Erro:
Quote:

(209) : error 076: syntax error in the expression, or invalid function call
(209) : error 072: "sizeof" operator is invalid on "function" symbols
(210) : error 076: syntax error in the expression, or invalid function call
(216) : error 076: syntax error in the expression, or invalid function call
(216) : error 072: "sizeof" operator is invalid on "function" symbols
(217) : error 076: syntax error in the expression, or invalid function call

me ajudem Please ;-;
Reply
#2

Olhei 4 vezes e nгo achei erro, me mande a linha dos erros.
Reply
#3

Quote:
Originally Posted by [BOPE]Seu._.Madruga
Посмотреть сообщение
Olhei 4 vezes e nгo achei erro, me mande a linha dos erros.
Login:
Quote:

format(Arquivo, sizeof(Arquivo), pCONTAS, pName(playerid));
if (!DOF2_FileExists(Arquivo)) return SendClientMessage(playerid, 0xFF0000AA, "Vocк nгo possui uma conta, se registre para logar.");

Registro:
Quote:

format(Arquivo, sizeof(Arquivo), pCONTAS, pName(playerid));
if (DOF2_FileExists(Arquivo)) return SendClientMessage(playerid, 0xFF0000AA, "Vocк jб possui uma conta, logue-se para entrar no servidor.");

Esta dando erro nessas Linhas Acimas/\
Reply
#4

pawn Код:
format(Arquivo, sizeof(Arquivo), "%s.ini", pName(playerid));
#Soluзгo: o parametro "Nome" nгo tinha sido usado.. agr ele estб "%s"
Reply
#5

Quote:
Originally Posted by String01
Посмотреть сообщение
pawn Код:
format(Arquivo, sizeof(Arquivo), "%s.ini", pName(playerid));
#Soluзгo: o parametro "Nome" nгo tinha sido usado.. agr ele estб "%s"
Deu na mesma, continou o mesmo Erro, e antes estava sendo usado sim, so que no Lugar de "%s" eu estava usando "pCONTAS"
Reply
#6

Preste atenзгo nesse cуdigo, tente usar como base para resolver:
PHP код:
Example Usage:
new 
result[128];
new 
number 42;
format(result,sizeof(result), "The number is %i.",number);  //-> The number is 42.
new string[]= "simple message";
format(result,sizeof(result), "This is a %s containing the number %i."stringnumber);
// This is a simple message containing the number 42.
new string[64];
format(string,sizeof(string),"Your score is: %d",GetPlayerScore(playerid));
SendClientMessage(playerid,0xFFFFFFAA,string);
new 
hourminutesecondstring[32];
gettime(hourminutesecond);
 
format(stringsizeof(string), "The time is %02d:%02d:%02d."hourminutesecond); // will output something like 09:45:02
SendClientMessage(playerid, -1string);
A quite easy way to insert the literal percent sign (%) is by doing the following.
new 
string[35];
format(string,sizeof(string),"43%s of my shirts are black.","%%");
SendClientMessage(playerid,0xFFFFFAA,string); 
LINK: https://sampwiki.blast.hk/wiki/Format
Reply
#7

Quote:

public OnPlayerClickTextDraw(playerid, Text:clickedid)
{
if(clickedid == WELCOME[11])
{
new Arquivo[40];
format(Arquivo, sizeof(Arquivo), pCONTAS, pName(playerid));
if (!DOF2_FileExists(Arquivo)) return SendClientMessage(playerid, 0xFF0000AA, "Vocк nгo possui uma conta, se registre para logar.");
format(Gstring, sizeof(Gstring), "{00FF00}Seja bem vindo {FFFFFF}%s\nLoge-se para poder jogar\nInforme sua senha de login\n", pName(playerid));
ShowPlayerDialog(playerid, LOGANDO, DIALOG_STYLE_PASSWORD, "----------LOGIN----------", Gstring, "Logar", "Sair");
}
if(clickedid == WELCOME[20])
{
new Arquivo[40];
format(Arquivo, sizeof(Arquivo), pCONTAS, pName(playerid));
if (DOF2_FileExists(Arquivo)) return SendClientMessage(playerid, 0xFF0000AA, "Vocк jб possui uma conta, logue-se para entrar no servidor.");
format(Gstring, sizeof(Gstring), "{00FF00}Seja bem vindo.{FFFFFF}%s\nVocк nгo possui uma conta.\nNos informe uma senha, Para se Registrar.\n", pName(playerid));
ShowPlayerDialog(playerid, REGISTRANDO, DIALOG_STYLE_PASSWORD, "----------REGISTRO----------", Gstring, "Registrar", "Sair");
}
return 1;
}

Nгo sei se irar da certo Mas Tente ae.
Reply
#8

Quote:
Originally Posted by Carlos001
Посмотреть сообщение
Nгo sei se irar da certo Mas Tente ae.
Funcionou Obrigado
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)