[HELP] Error 035: argument type mismatch (argument 3)
#1



Код:
C:\Users\KONTROWKEN\Desktop\SERVER\gamemodes\KONT-2016.pwn(13939) : error 035: argument type mismatch (argument 3)
Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase
1 Error.
Код:
dcmd_afklist(playerid, params[]){
#pragma unused params
  new dialogstr[300];
  new Lsname[MAX_PLAYER_NAME];
  for(new i = 0; i< MAX_PLAYERS; i++)
  {
   if(IsPlayerConnected(i))
   {
        if(Davi[i] == 1){
          GetPlayerName(i,Lsname,sizeof(Lsname));
	      strcat(dialogstr, "{0AA1CA}'%s' (ID:%d) {FFFFFF}Adlı Kisi AFK Oldu.{FF0000}(AFK)/n{0AA1CA}» {FFFFFF}Şuanda {FF0000}(%d) {FFFFFF}Kisi Afk Konumdadır.",Lsname, i,Daviii);
          ShowPlayerDialog(playerid,6000,DIALOG_STYLE_MSGBOX,"{FF6666}A{FFFFFF}laturkaFR - {FF6666}}Afk Listesi",dialogstr,"Tamam","Iptal");
          }}}
  return 1;
}
Reply
#2

Which line is 13939?
Reply
#3

Quote:
Originally Posted by czerwony03
Посмотреть сообщение
Which line is 13939?
Reply
#4

I think you didn't add the maxlength in the last of 13939 in "strcat" You need to add some length like "sizeof(string)" or some size.
Reply
#5

You can't use %s and %d in strcat, try this:
PHP код:
new lstring[256];
format(lstring"{0AA1CA}'%s' (ID:%d) {FFFFFF}Adlı Kisi AFK Oldu.{FF0000}(AFK)/n{0AA1CA}» {FFFFFF}Şuanda {FF0000}(%d) {FFFFFF}Kisi Afk Konumdadır.",Lsnamei,Daviii);
strcat(dialogstrlstring); 
Reply
#6

Please learn how to indent a script...

PHP код:
dcmd_afklist(playeridparams[])
{
    
#pragma unused params
    
static
        
dialogstr[300],
        
Lsname[MAX_PLAYER_NAME],
        
string[256];
    
    for(new 
0iMAX_PLAYERSi++)
    {
        if(
IsPlayerConnected(i)) continue;
        if(
Davi[i] == 1)
        {
            
GetPlayerName(iLsnamesizeof(Lsname));

            
format(stringsizeof(string), "{0AA1CA}'%s' (ID:%d) {FFFFFF}Adli Kisi AFK Oldu.{FF0000}(AFK)/n{0AA1CA}» {FFFFFF}Suanda {FF0000}(%d) {FFFFFF}Kisi Afk Konumdadir."LsnameiDaviii);
            
strcat(dialogstrstring);

            
ShowPlayerDialog(playerid6000DIALOG_STYLE_MSGBOX"{FF6666}A{FFFFFF}laturkaFR - {FF6666}}Afk Listesi"dialogstr"Tamam""Iptal");
        }
    }
    return 
1;

Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)