[Ajuda] argument type mismatch
#1

Fiz um comando para mudar a cor do ChatBubble do jogador, mais fica dando esses erros:

Erros:

Код:
Compilando BCV.pwn...
C:\Documents and Settings\Murilo de sousa\Desktop\Brasil City Virtual RPG 0.3e\gamemodes\BCV.pwn(5618) : error 035: argument type mismatch (argument 2)

C:\Documents and Settings\Murilo de sousa\Desktop\Brasil City Virtual RPG 0.3e\gamemodes\BCV.pwn(23191) : error 035: argument type mismatch (argument 3)

Pawn compiler 3.2.3664                          Copyright © 1997-2006, ITB CompuPhase
Code
PHP код:
                new stringCla[126];
                new 
corchat[40];
                
format(stringCla, sizeof(stringCla), "%s", DOF2_GetString(ArquivoClan2, "cla"));
                
format(corchat, sizeof(corchat), "%h", DOF2_GetString(ArquivoClan, "CorClan"));
                
SetPlayerChatBubble(x, stringCla, corchat, 40.0, 10000); 
Lembrando que as cores esta sendo salva em Hexadecimal ....
Reply
#2

DOF2_GetHex?
Reply
#3

format(corchat, sizeof(corchat), "%s", DOF2_GetString(ArquivoClan, "CorClan"));

tenta
Reply
#4

Quote:
Originally Posted by Jason`
Посмотреть сообщение
DOF2_GetHex?
Nгo Funcionou =/

Meu CorClan Estб Assim:

PHP код:

CMD
:corclan(playerid, params[])
{
    new 
Cor[20];
    
format(ArquivoClan2, sizeof(ArquivoClan2), "clas/%s.ini", nome(playerid));
    
format(ArquivoClan, sizeof(ArquivoClan), "clas/%s.ini", DOF2_GetString(ArquivoClan2, "cla"));
    if(!
DOF2_FileExists(ArquivoClan2))
    {
        
SendClientMessage(playerid, VERMELHO_ESCURO, "[ x ] Vocк nгo й dono de nenhum clan");
        return 
1;
    }
    if(
sscanf(params, "s[20]", Cor)) return SendClientMessage(playerid, VERMELHO_ESCURO, "[ x ] Uso: /CorClan [ Cor ]");
    if(
strcmp(Cor, "azul", false) == 0)
    {
        
DOF2_SetHex(ArquivoClan, "CorClan", 0x2D96FFAA);
        
SendClientMessage(playerid, 0x2D96FFAA, "[ CLAN ] Cor alterada para Amarelo");
        
DOF2_SaveFile();
    }
    else if(
strcmp(Cor, "amarelo", false) == 0)
    {
        
DOF2_SetHex(ArquivoClan, "CorClan", 0xE8E800AA);
        
SendClientMessage(playerid, 0xE8E800AA, "[ CLAN ] Cor alterada para Amarelo");
        
DOF2_SaveFile();
    }
    else if(
strcmp(Cor, "vermelho", false) == 0)
    {
        
DOF2_SetHex(ArquivoClan, "CorClan", 0xFC0000FF);
        
SendClientMessage(playerid, 0xFC0000FF, "[ CLAN ] Cor alterada para Amarelo");
        
DOF2_SaveFile();
    }
    return 
1;
} 
e Minha atualizaзгo ta assim:

PHP код:
                new stringCla[126];
                
format(stringCla, sizeof(stringCla), "%s", DOF2_GetString(ArquivoClan2, "cla"));
                
SetPlayerChatBubble(x, stringCla, DOF2_GetHex(ArquivoClan, "CorClan"), 40.0, 10000); 
Reply
#5

PHP код:
SetPlayerChatBubble(x, DOF2_GetString(ArquivoClan2, "cla"), DOF2_GetHex(ArquivoClan, "CorClan"), 40.0, 10000); 
Reply


Forum Jump:


Users browsing this thread: