another prob -.-
#1

im trying another way
Код:
dcmd_jail(playerid,params[])
{
    new id,string[128],time,pName[MAX_PLAYER_NAME],mName[MAX_PLAYER_NAME],reason[100];
    if(PInfo[playerid][Level] < 3) return SendClientMessage(playerid,red,"ERROR: You must be level 3");

    if(sscanf(params, "iis[100]", id,time,reason)) return SendClientMessage(playerid,red,"USAGE: /jail [playerid] [time 1/2/3] [reason]");
    PInfo[id][Jailed] = 1;
	GetPlayerName(playerid, pName, MAX_PLAYER_NAME);GetPlayerName(id, mName, MAX_PLAYER_NAME);
    format(string,sizeof string,"||Administrator %s jailed %s [%i min's] [reason: %s]||",pName,mName,strfind(time),reason);
    SendClientMessageToAll(red,string);
    format(string, sizeof(string), "MyAdmin/Users/%s.ini", mName);
	dini_IntSet(string,"Jailed",1);
	SendClientMessage(id,red,"You are now still in jail");
	PutPlayerInJail(id);
	if(!strcmp(params, "1", true))
	{
		SetTimerEx("releasefromjail",100000,0,"d",id);
	}
	if(!strcmp(params, "2", true))
	{
		SetTimerEx("releasefromjail",200000,0,"d",id);
	}
	if(!strcmp(params, "3", true))
	{
		SetTimerEx("releasefromjail",300000,0,"d",id);
	}
	return 1;
}
error line
Quote:

format(string,sizeof string,"||Administrator %s jailed %s [%i min's] [reason: %s]||",pName,mName,strval(time),reason);

error
Код:
C:\Users\mike\Desktop\server\filterscripts\dadmin.pwn(845) : error 035: argument type mismatch (argument 1)
Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase
1 Error.
Reply
#2

Код:
format(string,sizeof(string),"||Administrator %s jailed %s [%i min's] [reason: %s]||",pName,mName,strval(time),reason);
edit: I've just saw ur other post with the /jail command and just post a reply in there.. do not make everytime new topics..
Reply
#3

Quote:
Originally Posted by Mike_Peterson
Посмотреть сообщение
Код:
format(string,sizeof(string),"||Administrator %s jailed %s [%i min's] [reason: %s]||",pName,mName,strval(time),reason);
edit: I've just saw ur other post with the /jail command and just post a reply in there.. do not make everytime new topics..
what did u change and i get the same error
Reply
#4

if time is a int variable, the strtok causes the error, and besides strtok should have 2 parameters not 1

//edit: it says that the first parameter and from the code you can see that its "string" but the error doesn't say what functions's 1 parameter, that way it can be caused by strtok
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)