12.12.2014, 10:35
Hey guys, I got a little problem, might wanna help me out here?
Error:
Command:
Error line 44597:
Please help me out, I got multiple errors on this kind of lines, I don't know how to solve them :/
Bradley
Error:
Код:
(44597) : error 035: argument type mismatch (argument 2)
Код:
CMD:am(playerid, params[]) { if(PlayerInfo[playerid][pAdmin] != 0) { new toid, message[128]; if(!sscanf(params, "is[128]", toid, message)) return SendClientMessageEx(playerid, "[a]dmin[m]essage", "[playerid] [message]"); if(strlen(message) > 128) return SendClientMessageEx(playerid, "Your message cannot be longer than 128 characters."); if(!IsPlayerConnected(toid)) return SendClientMessageEx(playerid, "That player is not connected!"); new string[128]; format(string, "Admin message from %s: %s", GetPlayerNameEx(playerid), message); SendClientMessageEx(toid, COLOR_GREEN, string); format(string, "Admin %s [%d] > %s [%d]: %s", GetPlayerNameEx(playerid), playerid, GetPlayerNameEx(toid), toid, message); SendAdminMessage(COLOR_GREEN,string); Log("logs/adminmessage.log", string); PlayerInfo[playerid][pAMSSent] ++; } else { new message[80]; if(!sscanf(params, "s[80]", message)) return SendClientMessageEx(playerid, "[a]dmin[m]essage", "[message]"); if(strlen(message) > 80) return SendClientMessageEx(playerid, "Your message cannot be longer than 80 characters."); //if(strfind(message, "Falling", true) != -1) return Error(playerid, "Type (/falling) and a administrative person will be there to assist you right away!"); new string[128]; format(string, "Admin message from %s [%d]: %s", GetPlayerNameEx(playerid), playerid, message); SendAdminMessage(COLOR_GREEN,string); format(string, "Your message, %s, has been sent.", message); SendClientMessageEx(playerid, COLOR_GREEN, string); format(string, "Player %s [%d] > Admins: %s", GetPlayerNameEx(playerid), playerid, message); Log("logs/adminmessage.log", string); } return 1; }
Код:
format(string, "Admin message from %s: %s", GetPlayerNameEx(playerid), message); // THIS LINE SendClientMessageEx(toid, COLOR_GREEN, string);
Bradley