[Ajuda] Erros a compilar -
JuniorPT - 29.12.2011
Oi pessoal, preciso aqui de uma ajudinha.
Ta-me dando estes 3 erros
Код:
C:\Users\Diogo\Desktop\CRP\gamemodes\CRP.pwn(1410) : error 055: start of function body without function header
C:\Users\Diogo\Desktop\CRP\gamemodes\CRP.pwn(1414) : error 010: invalid function or declaration
C:\Users\Diogo\Desktop\CRP\gamemodes\CRP.pwn(1419) : error 010: invalid function or declaration
O code й este
Код:
{
SendClientMessage(playerid,0x00FF00FF,"Seja bem vindo pela primeira vez. Por favor digite uma senha para se registrar.");
format(regstring,sizeof(regstring),"{FFE4E1}%s, vocк ainda nгo possui uma conta em nosso banco de dados.\nPor favor digite uma senha para se registrar.",Nome(playerid));
ShowPlayerDialog(playerid,1,DIALOG_STYLE_INPUT,"{87CEEB}Registrar",regstring,"Registrar","Sair");
return 1;
}
SendClientMessage(playerid,0x00FFFFFF,"Digite sua senha no diбlogo abaixo para poder logar.");
format(regstring,sizeof(regstring),"{FAF0E6}%s, vocк jб possui uma conta no banco de dados.\nDigite sua senha abaixo para poder logar.",Nome(playerid));
ShowPlayerDialog(playerid,2,DIALOG_STYLE_INPUT,"{F5F5F5}Logar",regstring,"Logar","Sair");
return 1;
}
Re: [Ajuda] Erros a compilar -
Lуs - 29.12.2011
Poste a funзгo inteira.
Re: [Ajuda] Erros a compilar -
JuniorPT - 29.12.2011
Tem aqui a public toda.
Код:
public OnPlayerConnect(playerid)
{
new sendername[MAX_PLAYER_NAME];
new giveplayer[MAX_PLAYER_NAME];
new giveplayerid;
new str[256];
new NDetonador[MAX_PLAYER_NAME];
GetPlayerName(playerid, NDetonador, sizeof(NDetonador));
if(strfind(NDetonador, "_", true) == -1)
{
GetPlayerName(giveplayerid, giveplayer, sizeof(giveplayer));
GetPlayerName(playerid, sendername, sizeof (sendername));
format(str, sizeof (str), "{FF8C00}RevZ_ kickou %s Razгo: Nome Non-RP, coloca um nome RP. Ex: Martim_Miguel.", giveplayer, giveplayerid);
SendClientMessageToAll(COLOR_WHITE, str);
Kick(playerid);
new log[35];
new regstring[130];
format(log,sizeof log,"CONTAS/%s.ini",PlayerName(playerid));
if(!dini_Exists(log))
return 1;
}
//==================[Join Counter]=========================
JoinCounter = JoinCounter + 1;
dini_IntSet("CRP_Scriptfiles/Other/JoinCounter.cfg", "Connections", JoinCounter);
//=========================================================
ResetStats(playerid);//Setting variables to 0.
ClearScreen(playerid);//Clearing the users screen from SA-MP messages.
ShowScriptStats(playerid);//Showing the script information.
{
SendClientMessage(playerid,COLOR_GREEN,"_________________________________________________________");
SendClientMessage(playerid,COLOR_LIGHTBLUE2," Bem Vindo ao Portugal Evolution RolePlay ");
SendClientMessage(playerid, COLOR_LIGHTBLUE2, "Cumpre as regras do servidor e chama amigos!");
new accstring[64];
format(accstring, sizeof(accstring), "CRP_Scriptfiles/Accounts/%s.ini", GetPlayerName(playerid));
new File: hFile = fopen(accstring, io_read);
if (hFile)
SendClientMessage(playerid, COLOR_LIGHTBLUE2, "Cumpre as regras do servidor e chama amigos!");
SendClientMessage(playerid,COLOR_GREEN,"_________________________________________________________");
format(accstring, sizeof(accstring)," O Jogador %s entrou no servidor.", GetPlayerNameEx(playerid),GetPlayerNameEx(playerid));
SendClientMessageToAll(0x00A5F6AA, accstring);
}
//else
return 1;
}
stock IsARolePlayName(name[])
{
new
szLastCell,
bool: bUnderScore;
for(new i; i < strlen(name); i++)
{
if(name[i] == '_')
{
if(bUnderScore == true)
return 0;
bUnderScore = true;
}
else if(!szLastCell || szLastCell == '_') // Check if capitalized where it should be
if(name[i] < 'A' || name[i] > 'Z')
return 0;
else
if(name[i] < 'a' || name[i] > 'z')
return 0;
szLastCell = name[i];
}
if(bUnderScore == true)
return 0;
return 1;
PlayerName(playerid);
}
{
SendClientMessage(playerid,0x00FF00FF,"Seja bem vindo pela primeira vez. Por favor digite uma senha para se registrar.");
format(regstring,sizeof(regstring),"{FFE4E1}%s, vocк ainda nгo possui uma conta em nosso banco de dados.\nPor favor digite uma senha para se registrar.",Nome(playerid));
ShowPlayerDialog(playerid,1,DIALOG_STYLE_INPUT,"{87CEEB}Registrar",regstring,"Registrar","Sair");
return 1;
}
SendClientMessage(playerid,0x00FFFFFF,"Digite sua senha no diбlogo abaixo para poder logar.");
format(regstring,sizeof(regstring),"{FAF0E6}%s, vocк jб possui uma conta no banco de dados.\nDigite sua senha abaixo para poder logar.",Nome(playerid));
ShowPlayerDialog(playerid,2,DIALOG_STYLE_INPUT,"{F5F5F5}Logar",regstring,"Logar","Sair");
return 1;
}
Re: [Ajuda] Erros a compilar -
Lуs - 29.12.2011
Nossa!
pawn Код:
public OnPlayerConnect(playerid)
{
new sendername[MAX_PLAYER_NAME];
new giveplayer[MAX_PLAYER_NAME];
new giveplayerid;
new str[256];
new NDetonador[MAX_PLAYER_NAME];
GetPlayerName(playerid, NDetonador, sizeof(NDetonador));
if(strfind(NDetonador, "_", true) == -1)
{
GetPlayerName(giveplayerid, giveplayer, sizeof(giveplayer));
GetPlayerName(playerid, sendername, sizeof (sendername));
format(str, sizeof (str), "{FF8C00}RevZ_ kickou %s Razгo: Nome Non-RP, coloca um nome RP. Ex: Martim_Miguel.", giveplayer, giveplayerid);
SendClientMessageToAll(COLOR_WHITE, str);
Kick(playerid);
new log[35];
new regstring[130];
format(log,sizeof log,"CONTAS/%s.ini",PlayerName(playerid));
if(!dini_Exists(log))
return 1;
}
//==================[Join Counter]=========================
JoinCounter = JoinCounter + 1;
dini_IntSet("CRP_Scriptfiles/Other/JoinCounter.cfg", "Connections", JoinCounter);
//=========================================================
ResetStats(playerid);//Setting variables to 0.
ClearScreen(playerid);//Clearing the users screen from SA-MP messages.
ShowScriptStats(playerid);//Showing the script information.
{
SendClientMessage(playerid,COLOR_GREEN,"_________________________________________________________");
SendClientMessage(playerid,COLOR_LIGHTBLUE2," Bem Vindo ao Portugal Evolution RolePlay ");
SendClientMessage(playerid, COLOR_LIGHTBLUE2, "Cumpre as regras do servidor e chama amigos!");
new accstring[64];
format(accstring, sizeof(accstring), "CRP_Scriptfiles/Accounts/%s.ini", GetPlayerName(playerid));
new File: hFile = fopen(accstring, io_read);
if (hFile)
SendClientMessage(playerid, COLOR_LIGHTBLUE2, "Cumpre as regras do servidor e chama amigos!");
SendClientMessage(playerid,COLOR_GREEN,"_________________________________________________________");
format(accstring, sizeof(accstring)," O Jogador %s entrou no servidor.", GetPlayerNameEx(playerid),GetPlayerNameEx(playerid));
SendClientMessageToAll(0x00A5F6AA, accstring);
}
//else
return 1;
}
stock IsARolePlayName(name[])
{
new
szLastCell,
bool: bUnderScore;
for(new i; i < strlen(name); i++)
{
if(name[i] == '_')
{
if(bUnderScore == true)
return 0;
bUnderScore = true;
}
else if(!szLastCell || szLastCell == '_') // Check if capitalized where it should be
if(name[i] < 'A' || name[i] > 'Z')
return 0;
else
if(name[i] < 'a' || name[i] > 'z')
return 0;
szLastCell = name[i];
}
if(bUnderScore == true)
return 0;
return 1;
}
Comece por freeroam ou algo do tipo, nгo por RPG.
Re: [Ajuda] Erros a compilar -
JuniorPT - 30.12.2011
Porque apagou esta parte? eu estou a querer fazer um sistema de dialog como este.
http://forum.sa-mp.com/showthread.ph...registo+dialog
Tem aн.. veja o link da pastebin que estб nesse tуpico que meti /\.. eu meti como ele disse. ajuda ai please
++++REP++++ a quem ajudar