Help Please
#1

I get this error when i try to use sscanf for a /v command

Rp.pwn(3630) : error 035: argument type mismatch (argument 1)
Rp.pwn(3632) : error 035: argument type mismatch (argument 1)

Код:
CMD:v(playerid,params[])
{
	if(LoggedIn[playerid] == 0) return SendClientMessage(playerid,COLOR_WHITE,"**** You need to login/register first!");
	new option[12],model,color1,color2;
	new Name[MAX_PLAYER_NAME],string[128];
	GetPlayerName(playerid,Name,sizeof(Name));
	sscanf(params,"s[12]",option);
	if(isnull(option))
	{
		SendClientMessage(playerid, COLOR_LIGHTYELLOW, "USAGE: /(v)ehicle [action]");
		return 1;
	}
	if(!strcmp(option,"buy"))
	{
		if(IsPlayerInRangeOfPoint(playerid,5,542.9552,-1292.2853,17.2422))
		{
			if(!sscanf(option,"d",model))
			{
				if(!sscanf(model,"d",color1)) // line 3630
				{
					if(!sscanf(color1,"d",color2) // line 3632
					{
	                                            //Code... 
					}
				}
			}
		}
	}
	return 1;
}
Line 3630:
Код:
if(!sscanf(model,"d",color1))
Line 3632:
Код:
if(!sscanf(color1,"d",color2)
Reply
#2

Use i for integer value not d
Reply
#3

doesn't change anything, same errors :c
Reply
#4

Misread.
Reply
#5

Model, color1 value is integer but sscanf(string valie, "", variable)
Reply
#6

pawn Код:
if(!sscanf(params,"d",color1))
Reply
#7

[SOLVED]
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)