SA-MP Forums Archive
Why is sscanf2 giving me an argument mismatch (argument 1) - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: Why is sscanf2 giving me an argument mismatch (argument 1) (/showthread.php?tid=572479)



Why is sscanf2 giving me an argument mismatch (argument 1) - sammp - 28.04.2015

No idea why, but this line of code is just returning error "Argument Mismatch (argument 1)"

pawn Код:
CMD:spawncar(playerid, params)
    {
        new vehicle;
       
        if(sscanf(params, "d", vehicle))
        {
            SendClientMessage(playerid, clr_White, "Why");
        }
        return 1;
    }



Re: Why is sscanf2 giving me an argument mismatch (argument 1) - ATGOggy - 28.04.2015

PHP код:
    CMD:spawncar(playeridparams[])
    {
        new 
vehicle;
        
        if(
sscanf(params"d"vehicle))
        {
            
SendClientMessage(playeridclr_White"Why");
        }
        return 
1;
    } 



Re: Why is sscanf2 giving me an argument mismatch (argument 1) - J4Rr3x - 28.04.2015

Change:
pawn Код:
CMD:spawncar(playerid, params)
With:
pawn Код:
CMD:spawncar(playerid, params[]) // params is a string



Re: Why is sscanf2 giving me an argument mismatch (argument 1) - sammp - 28.04.2015

OH FOR FUCKS SAKE HOW DO I EVEN


+rep j4rr3x
+rep other guy aswell


Re: Why is sscanf2 giving me an argument mismatch (argument 1) - J4Rr3x - 28.04.2015

Quote:
Originally Posted by sammp
Посмотреть сообщение
OH FOR FUCKS SAKE HOW DO I EVEN


+rep j4rr3x
Ty