SA-MP Forums Archive
warning 202: number of arguments does not match definition - 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: warning 202: number of arguments does not match definition (/showthread.php?tid=630759)



warning 202: number of arguments does not match definition - AnoTek - 18.03.2017

Код:
new Float:ParkourRandom[][4] =
{
    {2442.3235,-1638.0476,13.4310,4.0},
    {1988.0079,-1628.4105,15.9691,4.0}
};
Код:
	if(dialogid == 1212)
	{
	    if(response)
	    {
	    	switch(listitem)
			{
				case 0:
				{
					SetPlayerVirtualWorld(playerid,1);
					new rand = random(sizeof(ParkourRandom));
					SetPlayerCheckpoint(playerid, ParkourRandom[rand][0], ParkourRandom[rand][1]);
					if(rand == 0)
					{
						TextDrawShowForPlayer(playerid, avispa);
					}
					if(rand == 1)
					{
						TextDrawShowForPlayer(playerid, eba);
					}
				}
			}	
		}
		return 1;
	}
What is wrong? How can i solve this??


Re: warning 202: number of arguments does not match definition - Jelly23 - 18.03.2017

SetPlayerCheckpoint(playerid, ParkourRandom[rand][0], ParkourRandom[rand][1]);

Two params missing, wiki.sa-mp.com/wiki/Function:SetPlayerCheckpoint


Re: warning 202: number of arguments does not match definition - AnoTek - 18.03.2017

Quote:
Originally Posted by Jelly23
Посмотреть сообщение
SetPlayerCheckpoint(playerid, ParkourRandom[rand][0], ParkourRandom[rand][1]);

Two params missing, wiki.sa-mp.com/wiki/Function:SetPlayerCheckpoint
Still doesn't work.. Fuck it.


Re: warning 202: number of arguments does not match definition - coool - 18.03.2017

Can you post your edited function here.


Re: warning 202: number of arguments does not match definition - Jelly23 - 18.03.2017

I don't know if you even tried, but give this a try:

SetPlayerCheckpoint(playerid, ParkourRandom[rand][0], ParkourRandom[rand][1], ParkourRandom[rand][2], 3.0);



Re: warning 202: number of arguments does not match definition - AnoTek - 18.03.2017

Quote:
Originally Posted by Jelly23
Посмотреть сообщение
I don't know if you even tried, but give this a try:

SetPlayerCheckpoint(playerid, ParkourRandom[rand][0], ParkourRandom[rand][1], ParkourRandom[rand][2], 3.0);
Stil doesn't work..


Re: warning 202: number of arguments does not match definition - Mencent - 18.03.2017

Hello!

Try this:
PHP код:
if(dialogid == 1212)
{
    if(
response)
    {
        switch(
listitem)
        {
            case 
0:
            {
                
SetPlayerVirtualWorld(playerid,1);
                new 
rand random(sizeof(ParkourRandom));
                
SetPlayerCheckpoint(playeridParkourRandom[rand][0], ParkourRandom[rand][1], ParkourRandom[rand][2],ParkourRandom[rand][3]);
                if(
rand == 0)
                {
                    
TextDrawShowForPlayer(playeridavispa);
                }
                else if(
rand == 1)
                {
                    
TextDrawShowForPlayer(playerideba);
                }
            }
        }
    }
    return 
1;




Re: warning 202: number of arguments does not match definition - AnoTek - 18.03.2017

Quote:
Originally Posted by Mencent
Посмотреть сообщение
Hello!

Try this:
PHP код:
if(dialogid == 1212)
{
    if(
response)
    {
        switch(
listitem)
        {
            case 
0:
            {
                
SetPlayerVirtualWorld(playerid,1);
                new 
rand random(sizeof(ParkourRandom));
                
SetPlayerCheckpoint(playeridParkourRandom[rand][0], ParkourRandom[rand][1], ParkourRandom[rand][2],ParkourRandom[rand][3]);
                if(
rand == 0)
                {
                    
TextDrawShowForPlayer(playeridavispa);
                }
                else if(
rand == 1)
                {
                    
TextDrawShowForPlayer(playerideba);
                }
            }
        }
    }
    return 
1;

Still doesn't wooorkkk......


Re: warning 202: number of arguments does not match definition - Mencent - 18.03.2017

Can you show us the error and the row of it, please?


Re: warning 202: number of arguments does not match definition - Hunud - 18.03.2017

new Float:ParkourRandom[][2] =
{
{2442.3235,-1638.0476,13.4310,4.0},
{1988.0079,-1628.4105,15.9691,4.0}
};