[Ajuda] O Que Esta Errado ?
#1

pawn Код:
public OnPlayerConnect(playerid)
{
    new string[64], Nome[MAX_PLAYER_NAME];
    GetPlayerName(playerid,Nome,MAX_PLAYER_NAME);
    format(string,sizeof string,"Criador/Dono/Scripter: DreeH_Knight");
    SendClientMessage(0xFFFFFFAA,string);
    format(string,sizeof string,"Sub-Dono: LadeN_Knight");
    SendClientMessage(0xFFFFFFAA,string);
    format(string,sizeof string,"Ajudante De Sub-Dono: Jon_Knight");
    SendClientMessage(0xFFFFFFAA,string);
    format(string,sizeof string,"Forum: ---");
    SendClientMessage(0xFFFFFFAA,string);
    format(string,sizeof string,"TeamSpeak: [EM BREVE]");
    SendClientMessage(0xFFFFFFAA,string);
    format(string,sizeof string,"%s Servidor seja bem vindo ao nosso servidor  !",Nome);
    SendClientMessage(0xFFFFFFAA,string);

    return 1;
}
pawn Код:
C:\Users\Acer\Downloads\[GM] Brasil Knight Games\gamemodes\BKG.pwn(29) : error 035: argument type mismatch (argument 2)
C:\Users\Acer\Downloads\[GM] Brasil Knight Games\gamemodes\BKG.pwn(31) : error 035: argument type mismatch (argument 2)
C:\Users\Acer\Downloads\[GM] Brasil Knight Games\gamemodes\BKG.pwn(33) : error 035: argument type mismatch (argument 2)
C:\Users\Acer\Downloads\[GM] Brasil Knight Games\gamemodes\BKG.pwn(35) : error 035: argument type mismatch (argument 2)
C:\Users\Acer\Downloads\[GM] Brasil Knight Games\gamemodes\BKG.pwn(37) : error 035: argument type mismatch (argument 2)
C:\Users\Acer\Downloads\[GM] Brasil Knight Games\gamemodes\BKG.pwn(39) : error 035: argument type mismatch (argument 2)
Pawn compiler 3.2.3664          Copyright (c) 1997-2006, ITB CompuPhase


6 Errors.
Reply
#2

Edite seu 'sizeof string' para sizeof(string).
Reply
#3

Pode Explicar Melhor Por favor ?
Reply
#4

Quote:
Originally Posted by Alisson Silva Alves
Посмотреть сообщение
pawn Код:
public OnPlayerConnect(playerid)
{
    new string[64], Nome[MAX_PLAYER_NAME];
    GetPlayerName(playerid,Nome,MAX_PLAYER_NAME);
    format(string,sizeof string,"Criador/Dono/Scripter: DreeH_Knight");
    SendClientMessage(0xFFFFFFAA,string);
    format(string,sizeof string,"Sub-Dono: LadeN_Knight");
    SendClientMessage(0xFFFFFFAA,string);
    format(string,sizeof string,"Ajudante De Sub-Dono: Jon_Knight");
    SendClientMessage(0xFFFFFFAA,string);
    format(string,sizeof string,"Forum: ---");
    SendClientMessage(0xFFFFFFAA,string);
    format(string,sizeof string,"TeamSpeak: [EM BREVE]");
    SendClientMessage(0xFFFFFFAA,string);
    format(string,sizeof string,"%s Servidor seja bem vindo ao nosso servidor  !",Nome);
    SendClientMessage(0xFFFFFFAA,string);

    return 1;
}
pawn Код:
C:\Users\Acer\Downloads\[GM] Brasil Knight Games\gamemodes\BKG.pwn(29) : error 035: argument type mismatch (argument 2)
C:\Users\Acer\Downloads\[GM] Brasil Knight Games\gamemodes\BKG.pwn(31) : error 035: argument type mismatch (argument 2)
C:\Users\Acer\Downloads\[GM] Brasil Knight Games\gamemodes\BKG.pwn(33) : error 035: argument type mismatch (argument 2)
C:\Users\Acer\Downloads\[GM] Brasil Knight Games\gamemodes\BKG.pwn(35) : error 035: argument type mismatch (argument 2)
C:\Users\Acer\Downloads\[GM] Brasil Knight Games\gamemodes\BKG.pwn(37) : error 035: argument type mismatch (argument 2)
C:\Users\Acer\Downloads\[GM] Brasil Knight Games\gamemodes\BKG.pwn(39) : error 035: argument type mismatch (argument 2)
Pawn compiler 3.2.3664          Copyright (c) 1997-2006, ITB CompuPhase


6 Errors.
Tenta

PHP код:
    GetPlayerName(playeridsendernamesizeof(sendername));
    
SendClientMessage(playerid0xFFFFFFAA"Criador/Dono/Scripter: DreeH_Knight");
    
SendClientMessage(playerid0xFFFFFFAA"Sub-Dono: LadeN_Knight");
    
SendClientMessage(playerid0xFFFFFFAA"Ajudante De Sub-Dono: Jon_Knight");
    
SendClientMessage(playerid0xFFFFFFAA"Forum: ---");
    
SendClientMessage(playerid0xFFFFFFAA"TeamSpeak: [EM BREVE]");
    
format(string,sizeof string,"%s Servidor seja bem vindo ao nosso servidor  !"sendername);
    
SendClientMessage(0xFFFFFFAA,string); 
Reply
#5

Quote:
Originally Posted by Dr_Pawno
Посмотреть сообщение
Edite seu 'sizeof string' para sizeof(string).
Isso nгo й necessбrio.



---

pawn Код:
native SendClientMessage(playerid, color, const message[]);


Vocк estб fazendo:
pawn Код:
SendClientMessage(color, const message[]);
Reply
#6

sizeof й uma funзгo, vocк precisa colocar os () para definir os parametros.

pawn Код:
/* Errado: */ format(string, sizeof string, "Sub-Dono: LadeN_Knight");
/* Correto: */ format(string, sizeof(string), "Sub-Dono: LadeN_Knight");
Achei outro erro:
SendClientMessage requer o parametro playerid, vocк esqueceu dele.

pawn Код:
/* Errado: */ SendClientMessage(0xFFFFFFAA, string);
/* Correto: */ SendClientMessage(playerid, 0xFFFFFFAA, string);
Vocк nгo precisa formatar um texto para mandar mensagens definidas, seu codigo funcionaria exatamente igual apenas com
pawn Код:
public OnPlayerConnect(playerid)
{
    new string[64],
        Nome[MAX_PLAYER_NAME];
    GetPlayerName(playerid,Nome,MAX_PLAYER_NAME);

    SendClientMessage(playerid, 0xFFFFFFAA, "Criador/Dono/Scripter: DreeH_Knight");
    SendClientMessage(playerid, 0xFFFFFFAA, "Sub-Dono: LadeN_Knight");
    SendClientMessage(playerid, 0xFFFFFFAA, "Ajudante De Sub-Dono: Jon_Knight");
    SendClientMessage(playerid, 0xFFFFFFAA, ,"Forum: ---");
    SendClientMessage(playerid, 0xFFFFFFAA, "TeamSpeak: [EM BREVE]");

    format(string, sizeof(string),"%s Servidor seja bem vindo ao nosso servidor  !", Nome);
    SendClientMessage(playerid, 0xFFFFFFAA, string);

    return 1;
}
Quote:
Originally Posted by zPain
Посмотреть сообщение
Isso nгo й necessбrio.
Serio? '-'
Depois de tanto tempo so agora que me falam ;-;
Reply
#7

Quote:
Originally Posted by Dr_Pawno
Посмотреть сообщение
sizeof й uma funзгo, vocк precisa colocar os () para definir os parametros.

pawn Код:
/* Errado: */ format(string, sizeof string, "Sub-Dono: LadeN_Knight");
/* Correto: */ format(string, sizeof(string), "Sub-Dono: LadeN_Knight");
sizeof й um operador.
Reply
#8

pawn Код:
GetPlayerName(playerid, sendername, sizeof(sendername));

pawn Код:
C:\Users\Acer\Downloads\[GM] Brasil Knight Games\gamemodes\BKG.pwn(26) : error 017: undefined symbol "sendername"
C:\Users\Acer\Downloads\[GM] Brasil Knight Games\gamemodes\BKG.pwn(26) : error 017: undefined symbol "sendername"
C:\Users\Acer\Downloads\[GM] Brasil Knight Games\gamemodes\BKG.pwn(26) : error 029: invalid expression, assumed zero
C:\Users\Acer\Downloads\[GM] Brasil Knight Games\gamemodes\BKG.pwn(26) : 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
#9

O cуdigo de Dr. Pawno й funcional.
Reply
#10

Aeee Deu Certo Vlw Galera
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)