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



Number of arguments does not match definition - Louris - 16.12.2012

Код:
COMMAND:fejerverkai(playerid,params[])
{
SetTimer("fejerverkas",3000, false);
new Float:X,Float:Y,Float:Z; GetPlayerPos(playerid,X,Y,Z);
fejerverkai = CreateDynamicObject(19282,X+2,Y,Z,0,0,0);
MoveDynamicObject(fejerverkai, X,Y,Z+4,7.0);
}
public fejerverkas()
{
for( new i = 0; i < MAX_PLAYERS; i++ )
{
new Float:X,Float:Y,Float:Z; GetPlayerPos(i,X,Y,Z);
DestroyObject(fejerverkai);
fejerverkai1 = CreateDynamicObject(19283, GetObjectPos(fejerverkai, X, Y, Z));
}
}
C:\Users\Lauryno\Desktop\Servas\gamemodes\bom.pwn( 1047) : warning 202: number of arguments does not match definition
C:\Users\Lauryno\Desktop\Servas\gamemodes\bom.pwn( 1047) : warning 202: number of arguments does not match definition
C:\Users\Lauryno\Desktop\Servas\gamemodes\bom.pwn( 1047) : warning 202: number of arguments does not match definition
C:\Users\Lauryno\Desktop\Servas\gamemodes\bom.pwn( 1047) : warning 202: number of arguments does not match definition
C:\Users\Lauryno\Desktop\Servas\gamemodes\bom.pwn( 1047) : warning 202: number of arguments does not match definition

I want to make that object fejerverkai1 create where object fejerverkai.


Re: Number of arguments does not match definition - frozen.iyan - 16.12.2012

Try This..

Код:
fejerverkai1 = CreateDynamicObject(19283, GetObjectPos(fejerverkai, X, Y, Z), 0, 0);



Re: Number of arguments does not match definition - Faisal_khan - 16.12.2012

The parameter for CreateDynamicObject is:
pawn Код:
(modelid, Float:X, Float:Y, Float:Z, Float:rX, Float:rY, Float:rZ, Float:DrawDistance)
Where rx, ry and rz are
Float:rX The X rotation of the object.
Float:rY The Y rotation of the object.
Float:rZ The Z rotation of the object.
So you will have to get the rotation of the objects to or you will have to set your own.


P.S.
Please use pawn tags to post codes.


Re: Number of arguments does not match definition - Louris - 16.12.2012

Quote:
Originally Posted by frozen.iyan
Посмотреть сообщение
Try This..

Код:
fejerverkai1 = CreateDynamicObject(19283, GetObjectPos(fejerverkai, X, Y, Z), 0, 0);
now:

C:\Users\Lauryno\Desktop\Servas\gamemodes\bom.pwn( 1047) : warning 202: number of arguments does not match definition
C:\Users\Lauryno\Desktop\Servas\gamemodes\bom.pwn( 1047) : warning 202: number of arguments does not match definition
C:\Users\Lauryno\Desktop\Servas\gamemodes\bom.pwn( 1047) : warning 202: number of arguments does not match definition


Re: Number of arguments does not match definition - frozen.iyan - 16.12.2012

Quote:
Originally Posted by Louris
Посмотреть сообщение
now:

C:\Users\Lauryno\Desktop\Servas\gamemodes\bom.pwn( 1047) : warning 202: number of arguments does not match definition
C:\Users\Lauryno\Desktop\Servas\gamemodes\bom.pwn( 1047) : warning 202: number of arguments does not match definition
C:\Users\Lauryno\Desktop\Servas\gamemodes\bom.pwn( 1047) : warning 202: number of arguments does not match definition
Quote:
Originally Posted by Faisal_khan
Посмотреть сообщение
The parameter for CreateDynamicObject is:
pawn Код:
(modelid, Float:X, Float:Y, Float:Z, Float:rX, Float:rY, Float:rZ, Float:DrawDistance)
Where rx, ry and rz are
Float:rX The X rotation of the object.
Float:rY The Y rotation of the object.
Float:rZ The Z rotation of the object.
So you will have to get the rotation of the objects to or you will have to set your own.


P.S.
Please use pawn tags to post codes.
Yeah , Change Your Code same with that parameter


Re: Number of arguments does not match definition - Faisal_khan - 16.12.2012

Did you read what I posted?


Re: Number of arguments does not match definition - RajatPawar - 16.12.2012

Simple enough? Check this: (Goddamn it, why keep the object's name so complicated, lol)
pawn Код:
new Float:x, Float:y, Float:z;
new Float:RotX,Float:RotY,Float:RotZ;
GetObjectPos(fejerverkai, x,y,z);
GetObjectRot(fejerverkai, RotX, RotY, RotZ);
fejerverkai1 = CreateObject(19283, x, y, z, RotX, RotY, RotZ, 100)



Re: Number of arguments does not match definition - Louris - 16.12.2012

fejerverkai1 = CreateDynamicObject(19283, x, y, z, RotX, RotY, RotZ);


But it doesn't create object.


Re: Number of arguments does not match definition - RajatPawar - 16.12.2012

WHUPS. Got pwnt, anyways, sorry, incomplete information!
@ Faisal : Thanks, for sharing it with me.


Re: Number of arguments does not match definition - Faisal_khan - 16.12.2012

Quote:
Originally Posted by Rajat_Pawar
Посмотреть сообщение
fejerverkai1 = CreateDynamicObject(19283, x, y, z, RotX, RotY, RotZ, 100 );
For god's sake, why are you eating up the parameters!?
Distance param is optional bruh.