SA-MP Forums Archive
[Ajuda] argument type mismatch - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: Non-English (https://sampforum.blast.hk/forumdisplay.php?fid=9)
+--- Forum: Languages (https://sampforum.blast.hk/forumdisplay.php?fid=33)
+---- Forum: Português/Portuguese (https://sampforum.blast.hk/forumdisplay.php?fid=34)
+---- Thread: [Ajuda] argument type mismatch (/showthread.php?tid=386620)



argument type mismatch - Maklister - 21.10.2012

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(stringClasizeof(stringCla), "%s"DOF2_GetString(ArquivoClan2"cla"));
                
format(corchatsizeof(corchat), "%h"DOF2_GetString(ArquivoClan"CorClan"));
                
SetPlayerChatBubble(xstringClacorchat40.010000); 
Lembrando que as cores esta sendo salva em Hexadecimal ....


Re: argument type mismatch - Jason` - 21.10.2012

DOF2_GetHex?


Re: argument type mismatch - Joao Pedro - 21.10.2012

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

tenta


Re: argument type mismatch - Maklister - 21.10.2012

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

Meu CorClan Estб Assim:

PHP код:

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

e Minha atualizaзгo ta assim:

PHP код:
                new stringCla[126];
                
format(stringClasizeof(stringCla), "%s"DOF2_GetString(ArquivoClan2"cla"));
                
SetPlayerChatBubble(xstringClaDOF2_GetHex(ArquivoClan"CorClan"), 40.010000); 



Re: argument type mismatch - paulor - 21.10.2012

PHP код:
SetPlayerChatBubble(xDOF2_GetString(ArquivoClan2"cla"), DOF2_GetHex(ArquivoClan"CorClan"), 40.010000);