Portal SAMP
[Ajuda] Erro no Game mode - Versão de Impressão

+- Portal SAMP (https://portalsamp.com)
+-- Fórum: SA-MP (https://portalsamp.com/forumdisplay.php?fid=5)
+--- Fórum: Área de suporte (https://portalsamp.com/forumdisplay.php?fid=6)
+--- Tópico: [Ajuda] Erro no Game mode (/showthread.php?tid=1981)



Erro no Game mode - Hiagou - 26/12/2021

Olá amigos

to com esse errozinho chato, alguem pode ajudar ?
Código:
error 035: argument type mismatch (argument 3)



Código PHP:
forward AtualizarRank();
public 
AtualizarRank()
{
foreach(
Playeri)
{
new 
CFRFAV[64];
if(
DinheiroFavela[6] >= 1) {

if(
DinheiroFavela[6] == 1) { CFRFAV "Teste"; }
if(
DinheiroFavela[7] == 1) { CFRFAV "Teste"; }
if(
DinheiroFavela[8] == 1) { CFRFAV "Teste"; }
}
if(
IsPlayerConnected(i))
{
checkrank("Score",             getPName(i), GetPlayerScore(i));
checkrank("Kill",                 getPName(i), Player[i][pMatou]);
checkrank("Money",             getPName(i), GetPlayerMoney(i));
checkrank("DueloW",                getPName(i), wDuelos[i]);
checkrank("DueloL",                getPName(i), lDuelos[i]);
checkrank("Procurado",            getPName(i), Player[i][pProcurado]);
checkrank("Hits",             getPName(i), Player[i][pRPTLidos]);
checkrank("MTXHits",             getPName(i), Player[i][pHitsMTX]);
checkrank("Vips",                getPName(i), Convert(Player[i][VIPExpira]-Now()));
}
}

return 
1;




RE: Erro no Game mode - SrBlue - 26/12/2021

poderia disponibilizar a função/stock
Código:
checkrank
para nos analisamos??


RE: Erro no Game mode - Hiagou - 26/12/2021

(26/12/2021 16:39)SrBlue Escreveu: poderia disponibilizar a função/stock
Código:
checkrank
para nos analisamos??


ai está, Corrigido

Código:
stock checkrank(rankname[], name[], points)
{

new string[100];

format(string, sizeof string, pasta_rank, rankname);

removenamerank(rankname, name);

new
name1[50],points1,
name2[50],points2,
name3[50],points3,
name4[50],points4,
name5[50],points5,
name6[50],points6,
name7[50],points7,
name8[50],points8,
name9[50],points9,
name10[50],points10,
name11[50],points11;

format(name1, sizeof name1, DOF2_GetString(string, "name1"));
points1 = DOF2_GetInt(string, "points1");
format(name2, sizeof name2, DOF2_GetString(string, "name2"));
points2 = DOF2_GetInt(string, "points2");
format(name3, sizeof name3, DOF2_GetString(string, "name3"));
points3 = DOF2_GetInt(string, "points3");
format(name4, sizeof name4, DOF2_GetString(string, "name4"));
points4 = DOF2_GetInt(string, "points4");
format(name5, sizeof name5, DOF2_GetString(string, "name5"));
points5 = DOF2_GetInt(string, "points5");
format(name6, sizeof name6, DOF2_GetString(string, "name6"));
points6 = DOF2_GetInt(string, "points6");
format(name7, sizeof name7, DOF2_GetString(string, "name7"));
points7 = DOF2_GetInt(string, "points7");
format(name8, sizeof name8, DOF2_GetString(string, "name8"));
points8 = DOF2_GetInt(string, "points8");
format(name9, sizeof name9, DOF2_GetString(string, "name9"));
points9 = DOF2_GetInt(string, "points9");
format(name10, sizeof name10, DOF2_GetString(string, "name10"));
points10 = DOF2_GetInt(string, "points10");
format(name11, sizeof name11, DOF2_GetString(string, "name11"));
points11 = DOF2_GetInt(string, "points11");

if(points > points1)
{
DOF2_SetString(string,         "name2",     name1);
DOF2_SetInt(string,         "points2",     points1);
DOF2_SetString(string,         "name3",     name2);
DOF2_SetInt(string,         "points3",     points2);
DOF2_SetString(string,         "name4",     name3);
DOF2_SetInt(string,         "points4",     points3);
DOF2_SetString(string,         "name5",     name4);
DOF2_SetInt(string,         "points5",     points4);
DOF2_SetString(string,         "name6",     name5);
DOF2_SetInt(string,         "points6",     points5);
DOF2_SetString(string,         "name7",     name6);
DOF2_SetInt(string,         "points7",     points6);
DOF2_SetString(string,         "name8",     name7);
DOF2_SetInt(string,         "points8",     points7);
DOF2_SetString(string,         "name9",     name8);
DOF2_SetInt(string,         "points9",     points8);
DOF2_SetString(string,         "name10",     name9);
DOF2_SetInt(string,         "points10",    points9);

//set rank
DOF2_SetString(string,         "name1",     name);
DOF2_SetInt(string,         "points1",     points);

//save
DOF2_SaveFile();
}
else if(points > points2)
{
//  removenamerank(rankname, name);
DOF2_SetString(string,         "name3",     name2);
DOF2_SetInt(string,         "points3",     points2);
DOF2_SetString(string,         "name4",     name3);
DOF2_SetInt(string,         "points4",     points3);
DOF2_SetString(string,         "name5",     name4);
DOF2_SetInt(string,         "points5",     points4);
DOF2_SetString(string,         "name6",     name5);
DOF2_SetInt(string,         "points6",     points5);
DOF2_SetString(string,         "name7",     name6);
DOF2_SetInt(string,         "points7",     points6);
DOF2_SetString(string,         "name8",     name7);
DOF2_SetInt(string,         "points8",     points7);
DOF2_SetString(string,         "name9",     name8);
DOF2_SetInt(string,         "points9",     points8);
DOF2_SetString(string,         "name10",     name9);
DOF2_SetInt(string,         "points10",    points9);

DOF2_SetString(string,         "name2",     name);
DOF2_SetInt(string,         "points2",     points);

//save
DOF2_SaveFile();
}
else if(points > points3)
{
// removenamerank(rankname, name);
DOF2_SetString(string,         "name4",     name3);
DOF2_SetInt(string,         "points4",     points3);
DOF2_SetString(string,         "name5",     name4);
DOF2_SetInt(string,         "points5",     points4);
DOF2_SetString(string,         "name6",     name5);
DOF2_SetInt(string,         "points6",     points5);
DOF2_SetString(string,         "name7",     name6);
DOF2_SetInt(string,         "points7",     points6);
DOF2_SetString(string,         "name8",     name7);
DOF2_SetInt(string,         "points8",     points7);
DOF2_SetString(string,         "name9",     name8);
DOF2_SetInt(string,         "points9",     points8);
DOF2_SetString(string,         "name10",     name9);
DOF2_SetInt(string,         "points10",    points9);

DOF2_SetString(string,         "name3",     name);
DOF2_SetInt(string,         "points3",     points);

//save
DOF2_SaveFile();
}
else if(points > points4)
{
// removenamerank(rankname, name);
DOF2_SetString(string,         "name5",     name4);
DOF2_SetInt(string,         "points5",     points4);
DOF2_SetString(string,         "name6",     name5);
DOF2_SetInt(string,         "points6",     points5);
DOF2_SetString(string,         "name7",     name6);
DOF2_SetInt(string,         "points7",     points6);
DOF2_SetString(string,         "name8",     name7);
DOF2_SetInt(string,         "points8",     points7);
DOF2_SetString(string,         "name9",     name8);
DOF2_SetInt(string,         "points9",     points8);
DOF2_SetString(string,         "name10",     name9);
DOF2_SetInt(string,         "points10",    points9);

DOF2_SetString(string,         "name4",     name);
DOF2_SetInt(string,         "points4",     points);

//save
DOF2_SaveFile();
}
else if(points > points5)
{
// removenamerank(rankname, name);
DOF2_SetString(string,         "name6",     name5);
DOF2_SetInt(string,         "points6",     points5);
DOF2_SetString(string,         "name7",     name6);
DOF2_SetInt(string,         "points7",     points6);
DOF2_SetString(string,         "name8",     name7);
DOF2_SetInt(string,         "points8",     points7);
DOF2_SetString(string,         "name9",     name8);
DOF2_SetInt(string,         "points9",     points8);
DOF2_SetString(string,         "name10",     name9);
DOF2_SetInt(string,         "points10",    points9);

DOF2_SetString(string,         "name5",     name);
DOF2_SetInt(string,         "points5",     points);

//save
DOF2_SaveFile();
}
else if(points > points6)
{
//        removenamerank(rankname, name);
DOF2_SetString(string,         "name7",     name6);
DOF2_SetInt(string,         "points7",     points6);
DOF2_SetString(string,         "name8",     name7);
DOF2_SetInt(string,         "points8",     points7);
DOF2_SetString(string,         "name9",     name8);
DOF2_SetInt(string,         "points9",     points8);
DOF2_SetString(string,         "name10",     name9);
DOF2_SetInt(string,         "points10",    points9);

DOF2_SetString(string,         "name6",     name);
DOF2_SetInt(string,         "points6",     points);

//save
DOF2_SaveFile();
}
else if(points > points6)
{
//         removenamerank(rankname, name);
DOF2_SetString(string,         "name7",     name6);
DOF2_SetInt(string,         "points7",     points6);
DOF2_SetString(string,         "name8",     name7);
DOF2_SetInt(string,         "points8",     points7);
DOF2_SetString(string,         "name9",     name8);
DOF2_SetInt(string,         "points9",     points8);
DOF2_SetString(string,         "name10",     name9);
DOF2_SetInt(string,         "points10",    points9);

DOF2_SetString(string,         "name6",     name);
DOF2_SetInt(string,         "points6",     points);

//save
DOF2_SaveFile();
}
else if(points > points7)
{
//         removenamerank(rankname, name);
DOF2_SetString(string,         "name8",     name7);
DOF2_SetInt(string,         "points8",     points7);
DOF2_SetString(string,         "name9",     name8);
DOF2_SetInt(string,         "points9",     points8);
DOF2_SetString(string,         "name10",     name9);
DOF2_SetInt(string,         "points10",    points9);

DOF2_SetString(string,         "name7",     name);
DOF2_SetInt(string,         "points7",     points);

//save
DOF2_SaveFile();
}
else if(points > points8)
{
//         removenamerank(rankname, name);
DOF2_SetString(string,         "name9",     name8);
DOF2_SetInt(string,         "points9",     points8);
DOF2_SetString(string,         "name10",     name9);
DOF2_SetInt(string,         "points10",    points9);

DOF2_SetString(string,         "name8",     name);
DOF2_SetInt(string,         "points8",     points);

//save
DOF2_SaveFile();
}
else if(points > points9)
{
//        removenamerank(rankname, name);
DOF2_SetString(string,         "name10",     name9);
DOF2_SetInt(string,         "points10",    points9);

DOF2_SetString(string,         "name9",     name);
DOF2_SetInt(string,         "points9",     points);

//save
DOF2_SaveFile();
}
else if(points > points10)
{
//         removenamerank(rankname, name);
DOF2_SetString(string,         "name10",     name);
DOF2_SetInt(string,         "points10", points);

//save
DOF2_SaveFile();
}

//Extra
else if(points > points11)
{
//         removenamerank(rankname, name);
DOF2_SetString(string,         "name11",     name);
DOF2_SetInt(string,         "points11", points);

//save
DOF2_SaveFile();
}



RE: Erro no Game mode - xbruno1000x - 27/12/2021

Em que linha acontece o tal erro? Imagino que seja nos checkrank, mas ocorre em todos ou somente em um único?