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; }
(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 |
Olhei 4 vezes e nгo achei erro, me mande a linha dos erros.
|
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(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(Arquivo, sizeof(Arquivo), "%s.ini", pName(playerid));
pawn Код:
|
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.", string, number);
// 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 hour, minute, second, string[32];
gettime(hour, minute, second);
format(string, sizeof(string), "The time is %02d:%02d:%02d.", hour, minute, second); // will output something like 09:45:02
SendClientMessage(playerid, -1, string);
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);
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; } |