05.09.2014, 12:07
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)
Line 3630:
Line 3632:
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; }
Код:
if(!sscanf(model,"d",color1))
Код:
if(!sscanf(color1,"d",color2)