strcat(string2, "Faction - Name:%s | Rank:%s | Division:%s\n",PFactionName[playerib],PFactionRank[playerib],PFactionDivision[playerib]);
error 035: argument type mismatch (argument 3)
format(string2, sizeof (string2), "Faction - Name:%s | Rank:%s | Division:%s\n",
PFactionName[playerib],
PFactionRank[playerib],
PFactionDivision[playerib]);
new a[256],b[256]; format(a,sizeof(a),"a"); format(b,sizeof(b),"b"); strcat(string2,"%s %s..etc",a,b... etc);
strcat is only used to join another string (formatted before as it doesn't accept arguments like format function).
You can split the arguments as long as you want (the string would be with \ character but no need to. pawn Код:
|
strcat(string2, "Account - Player level:%d | Playing hours:%d | Playing minutes:%d | Checks signed:%d | Administrator level:%d | Helper level:%d | Donator level:%d\n",pInfo[playerib][Level],pInfo[playerib][Hours],pInfo[playerib][Minutes],pInfo[playerib][Checks],pInfo[playerib][Admin],pInfo[playerib][Helper],pInfo[playerib][Donator]); strcat(string2, "Inventory - Money:%d | Bank:%d | Sandwiches:%d | Hotdogs:%d | Apples:%d | Sodas:%d\n",pInfo[playerib][Money],pInfo[playerib][Bank],pInfo[playerib][Sandwiches],pInfo[playerib][Hotdogs],pInfo[playerib][Apples],pInfo[playerib][Sodas]); //strcat(string2, "Faction - Name:%s | Rank:%s | Division:%s\n",PFactionName[playerib],PFactionRank[playerib],PFactionDivision[playerib]); strcat(string2, "Admin record - Prisons:%d | Warnings:%d | Kicks:%d | Temp. bans:%d | Perm. bans:%d",pInfo[playerib][Prisons],pInfo[playerib][Warnings],pInfo[playerib][Kicks],pInfo[playerib][TempBans],pInfo[playerib][PermBans]);
new a[256];//your new variable for formated new b[256];//your new variable for formated format(a,sizeof(a),"your faction stats",your variables); format(b,sizeof(b),"your faction stats",your variables); strcat(string1/2,"%s=a %s = b",a,b);
new string2[512]; // if the text is cut out, increase it.
format(string2, sizeof (string2), "Account - Player level:%d | Playing hours:%d | Playing minutes:%d | Checks signed:%d | Administrator level:%d | Helper level:%d | Donator level:%d\n" \
"Inventory - Money:%d | Bank:%d | Sandwiches:%d | Hotdogs:%d | Apples:%d | Sodas:%d\n" \
"Faction - Name:%s | Rank:%s | Division:%s\n" \
"Admin record - Prisons:%d | Warnings:%d | Kicks:%d | Temp. bans:%d | Perm. bans:%d",
pInfo[playerib][Level],pInfo[playerib][Hours],pInfo[playerib][Minutes],pInfo[playerib][Checks],pInfo[playerib][Admin],pInfo[playerib][Helper],pInfo[playerib][Donator],
pInfo[playerib][Money],pInfo[playerib][Bank],pInfo[playerib][Sandwiches],pInfo[playerib][Hotdogs],pInfo[playerib][Apples],pInfo[playerib][Sodas]
PFactionName[playerib],PFactionRank[playerib],PFactionDivision[playerib],
pInfo[playerib][Prisons],pInfo[playerib][Warnings],pInfo[playerib][Kicks],pInfo[playerib][TempBans],pInfo[playerib][PermBans]);