how to fix "number of arguments does not match definition"
#1

Код HTML:
if(strcmp(cmd, "/makevip", true) == 0)
	{
		if(Player[playerid][pBlockAd] == 1) return SendClientMessage(playerid,COLOR_RED,""System": Ban da bi cam dung lenh nay");
    	if(Player[playerid][pAdmin] < 3) return SendClientMessage(playerid,COLOR_RED,""System": Ban khong du quyen luc de thuc hien cau lenh nay, ban phai la mot Admin");
		new userid,level,ngay[128];
		tmp = strtok(cmdtext, idx);
		if(!strlen(tmp,userid,level,ngay)) return SendClientMessage(playerid,COLOR_RED,""System"/makeadmin [playerid] [level]");
		if(userid == INVALID_PLAYER_ID || (IsPlayerConnected(userid) && Login[userid] == false))return SendClientMessage(playerid,COLOR_RED,"Sai ID");
		if(Player[userid][pAdmin] > Player[playerid][pAdmin]) return SendClientMessage(playerid,COLOR_RED,"Ban khong the Ban nguoi nay");
		Player[userid][pAdmin] = level;
		new str[128];
		format(str,sizeof(str),"Administrator [%s] da make %s len Admin level %d",GetName(playerid),GetName(userid),level);
		WriteLog("Makevip",string);
		SAM(COLOR_YELLOW,str,1);
		return 1;
	}
Код HTML:
stock MakeVip(playerid,level,ngay)
{
	if(level > 3) return 1;
	new str[128];
	if(Player[playerid][pVIP] == level)
	{
	Player[playerid][pVIPCount] += ngay*86400;
	format(str,sizeof(str),"Ban da duoc cong them thoi gian %s la %d ngay",GetVipType(level),ngay);
	}
	else
	{
	Player[playerid][pVIP] = level;
	Player[playerid][pVIPCount] = ngay*86400;
	format(str,sizeof(str),"* Ban da nhan duoc vip %s %d ngay",GetVipType(level),ngay);
	}
	SAM(playerid,COLOR_RED,string,1);
	return 1;
}
Reply
#2

why you don't use zcmd ?
Reply
#3

C:\Documents and Settings\Admin\Desktop\123\gamemodes\dayz.pwn(3439 ) : warning 202: number of arguments does not match definition
C:\Documents and Settings\Admin\Desktop\123\gamemodes\dayz.pwn(3439 ) : warning 202: number of arguments does not match definition
C:\Documents and Settings\Admin\Desktop\123\gamemodes\dayz.pwn(3439 ) : warning 202: number of arguments does not match definition
C:\Documents and Settings\Admin\Desktop\123\gamemodes\dayz.pwn(3440 ) : warning 213: tag mismatch
Reply
#4

Quote:
Originally Posted by ongnung147
Посмотреть сообщение
C:\Documents and Settings\Admin\Desktop\123\gamemodes\dayz.pwn(3439 ) : warning 202: number of arguments does not match definition
C:\Documents and Settings\Admin\Desktop\123\gamemodes\dayz.pwn(3439 ) : warning 202: number of arguments does not match definition
C:\Documents and Settings\Admin\Desktop\123\gamemodes\dayz.pwn(3439 ) : warning 202: number of arguments does not match definition
C:\Documents and Settings\Admin\Desktop\123\gamemodes\dayz.pwn(3440 ) : warning 213: tag mismatch
Would be useful if you could tell what line is 3439. At any rate, look at the arguments you pass in the the methods you call on that line. Like the warning says, the number of arguments in the call don't match the number of arguments in the definition. You are likely missing an argument or two, or else you may have misplaced some parenthesis.
Reply
#5

PHP код:
if(!strlen(tmp,userid,level,ngay)) 
https://sampwiki.blast.hk/wiki/Strlen
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)