SA-MP Forums Archive
[13:25:13] *** CreateDynamicObject: Expecting 12 parameter(s), but found 11 - 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: [13:25:13] *** CreateDynamicObject: Expecting 12 parameter(s), but found 11 (/showthread.php?tid=506905)



[13:25:13] *** CreateDynamicObject: Expecting 12 parameter(s), but found 11 - ChristianIvann09 - 15.04.2014

Before i update the streamer plugin plus the include

I got this
Код:
[12:15:19] *** CreateDynamicMapIcon: Expecting 9 parameter(s), but found 10
[12:15:19] *** CreateDynamicMapIcon: Expecting 9 parameter(s), but found 10
[12:15:19] *** CreateDynamicMapIcon: Expecting 9 parameter(s), but found 10
[12:15:19] *** CreateDynamicMapIcon: Expecting 9 parameter(s), but found 10
[12:15:19] *** CreateDynamicMapIcon: Expecting 9 parameter(s), but found 10
[12:15:19] *** CreateDynamicMapIcon: Expecting 9 parameter(s), but found 10
[12:15:19] *** CreateDynamicMapIcon: Expecting 9 parameter(s), but found 10
[12:15:19] *** CreateDynamicMapIcon: Expecting 9 parameter(s), but found 10
[12:15:19] *** CreateDynamicMapIcon: Expecting 9 parameter(s), but found 10
[12:15:19] *** CreateDynamicMapIcon: Expecting 9 parameter(s), but found 10
[12:15:19] *** CreateDynamicMapIcon: Expecting 9 parameter(s), but found 10
[12:15:19] *** CreateDynamicMapIcon: Expecting 9 parameter(s), but found 10
[12:15:19] *** CreateDynamicMapIcon: Expecting 9 parameter(s), but found 10
[12:15:19] *** CreateDynamicMapIcon: Expecting 9 parameter(s), but found 10
[12:15:19] *** CreateDynamicMapIcon: Expecting 9 parameter(s), but found 10
[12:15:19] *** CreateDynamicMapIcon: Expecting 9 parameter(s), but found 10
[12:15:19] *** CreateDynamicMapIcon: Expecting 9 parameter(s), but found 10
[12:15:19] *** CreateDynamicMapIcon: Expecting 9 parameter(s), but found 10
[12:15:19] *** CreateDynamicMapIcon: Expecting 9 parameter(s), but found 10
[12:15:19] *** CreateDynamicMapIcon: Expecting 9 parameter(s), but found 10
[12:15:19] *** CreateDynamicMapIcon: Expecting 9 parameter(s), but found 10
[12:15:19] *** CreateDynamicMapIcon: Expecting 9 parameter(s), but found 10
[12:15:19] *** CreateDynamicMapIcon: Expecting 9 parameter(s), but found 10
[12:15:19] *** CreateDynamicMapIcon: Expecting 9 parameter(s), but found 10
[12:15:19] *** CreateDynamicMapIcon: Expecting 9 parameter(s), but found 10
[12:15:19] *** CreateDynamicMapIcon: Expecting 9 parameter(s), but found 10
[12:15:19] *** CreateDynamicMapIcon: Expecting 9 parameter(s), but found 10
[12:15:19] *** CreateDynamicMapIcon: Expecting 9 parameter(s), but found 10
[12:15:19] *** CreateDynamicMapIcon: Expecting 9 parameter(s), but found 10
[12:15:19] *** CreateDynamicMapIcon: Expecting 9 parameter(s), but found 10
[12:15:19] *** CreateDynamicMapIcon: Expecting 9 parameter(s), but found 10
[12:15:19] *** CreateDynamicMapIcon: Expecting 9 parameter(s), but found 10
[12:15:19] *** CreateDynamicMapIcon: Expecting 9 parameter(s), but found 10
[12:15:19] *** CreateDynamicMapIcon: Expecting 9 parameter(s), but found 10
[12:15:19] *** CreateDynamicMapIcon: Expecting 9 parameter(s), but found 10
[12:15:19] *** CreateDynamicMapIcon: Expecting 9 parameter(s), but found 10
[12:15:19] *** CreateDynamicMapIcon: Expecting 9 parameter(s), but found 10
[12:15:19] *** CreateDynamicMapIcon: Expecting 9 parameter(s), but found 10
[12:15:19] *** CreateDynamicMapIcon: Expecting 9 parameter(s), but found 10
[12:15:19] *** CreateDynamicMapIcon: Expecting 9 parameter(s), but found 10
[12:15:19] *** CreateDynamicMapIcon: Expecting 9 parameter(s), but found 10
[12:15:19] *** CreateDynamicMapIcon: Expecting 9 parameter(s), but found 10
[12:15:19] *** CreateDynamicMapIcon: Expecting 9 parameter(s), but found 10
[12:15:19] *** CreateDynamicMapIcon: Expecting 9 parameter(s), but found 10
[12:15:19] *** CreateDynamicMapIcon: Expecting 9 parameter(s), but found 10
[12:15:19] *** CreateDynamicMapIcon: Expecting 9 parameter(s), but found 10
[12:15:19] *** CreateDynamicMapIcon: Expecting 9 parameter(s), but found 10
[12:15:19] *** CreateDynamicMapIcon: Expecting 9 parameter(s), but found 10
[12:15:19] *** CreateDynamicMapIcon: Expecting 9 parameter(s), but found 10
[12:15:19] *** CreateDynamicMapIcon: Expecting 9 parameter(s), but found 10
[12:15:19] *** CreateDynamicMapIcon: Expecting 9 parameter(s), but found 10
[12:15:19] *** CreateDynamicMapIcon: Expecting 9 parameter(s), but found 10
[12:15:19] *** CreateDynamicMapIcon: Expecting 9 parameter(s), but found 10
[12:15:19] *** CreateDynamicMapIcon: Expecting 9 parameter(s), but found 10
[12:15:19] *** CreateDynamicMapIcon: Expecting 9 parameter(s), but found 10
[12:15:19] *** CreateDynamicMapIcon: Expecting 9 parameter(s), but found 10
[12:15:19] *** CreateDynamicMapIcon: Expecting 9 parameter(s), but found 10
[12:15:19] *** CreateDynamicMapIcon: Expecting 9 parameter(s), but found 10
[12:15:19] *** CreateDynamicMapIcon: Expecting 9 parameter(s), but found 10
[12:15:19] *** CreateDynamicMapIcon: Expecting 9 parameter(s), but found 10
[12:15:19] *** CreateDynamicMapIcon: Expecting 9 parameter(s), but found 10
[12:15:19] *** CreateDynamicMapIcon: Expecting 9 parameter(s), but found 10
[12:15:19] *** CreateDynamicMapIcon: Expecting 9 parameter(s), but found 10
''=

After i update my streamer plugin plus the include. now i got this -_-


How to fix that?


Re: [13:25:13] *** CreateDynamicObject: Expecting 12 parameter(s), but found 11 - Dignity - 15.04.2014

Can you please post your code?

Also, doesn't it seem obvious at all that the script wants 12 params, but you only have 11? You fix it by adding another param.


Re: [13:25:13] *** CreateDynamicObject: Expecting 12 parameter(s), but found 11 - ChristianIvann09 - 15.04.2014

Quote:
Originally Posted by Mionee
Посмотреть сообщение
Can you please post your code?

Also, doesn't it seem obvious at all that the script wants 12 params, but you only have 11? You fix it by adding another param.
lol i have many many many many createdynamicobject in script


Re: [13:25:13] *** CreateDynamicObject: Expecting 12 parameter(s), but found 11 - Dignity - 15.04.2014

What's your Streamer plugin version?


Re: [13:25:13] *** CreateDynamicObject: Expecting 12 parameter(s), but found 11 - ChristianIvann09 - 15.04.2014

Quote:
Originally Posted by Mionee
Посмотреть сообщение
What's your Streamer plugin version?
0.3z. I downloaded the latest


Re: [13:25:13] *** CreateDynamicObject: Expecting 12 parameter(s), but found 11 - Dignity - 15.04.2014

Quote:
Originally Posted by ChristianIvann09
Посмотреть сообщение
0.3z. I downloaded the latest
Your streamer plugin, not SA-MP.

Anyway, this are the new params: (version 2.7.1)

pawn Код:
CreateDynamicObject(modelid, Float:x, Float:y, Float:z, Float:rx, Float:ry, Float:rz, worldid = -1, interiorid = -1, playerid = -1, Float:streamdistance = 200.0, Float:drawdistance = 0.0);
Just add

pawn Код:
, 0.0);
behind your existing stream distance value.

So it'd look like this:

pawn Код:
CreateDynamicObject(1337, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, -1, -1, -1, 200.0, 0.0);
instead of

pawn Код:
CreateDynamicObject(1337, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, -1, -1, -1, 200.0);



Re: [13:25:13] *** CreateDynamicObject: Expecting 12 parameter(s), but found 11 - ChristianIvann09 - 15.04.2014

Quote:
Originally Posted by Mionee
Посмотреть сообщение
Your streamer plugin, not SA-MP.

Anyway, this are the new params: (version 2.7.1)

pawn Код:
CreateDynamicObject(modelid, Float:x, Float:y, Float:z, Float:rx, Float:ry, Float:rz, worldid = -1, interiorid = -1, playerid = -1, Float:streamdistance = 200.0, Float:drawdistance = 0.0);
Just add

pawn Код:
, 0.0);
behind your existing stream distance value.

So it'd look like this:

pawn Код:
CreateDynamicObject(1337, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, -1, -1, -1, 200.0, 0.0);
instead of

pawn Код:
CreateDynamicObject(1337, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, -1, -1, -1, 200.0);
I have alot of CreateDynamicObject in script. So what do i do to edit once?


Re: [13:25:13] *** CreateDynamicObject: Expecting 12 parameter(s), but found 11 - forgottenkings - 15.04.2014

why not use any object coverters and convert again?


Re: [13:25:13] *** CreateDynamicObject: Expecting 12 parameter(s), but found 11 - Lordzy - 15.04.2014

Use a custom function instead of the "CreateDynamicObject"
pawn Код:
stock CreateDynamicObjectEx(modelid, Float:x, Float:y, Float:z, Float:rx, Float:ry, Float:rz, worldid = -1, interiorid = -1, playerid = -1, Float:streamdistance = 200.0, Float:drawdistance = 200.0)
    return CreateDynamicObject(modelid, x, y, z, rx, ry, z, worldid, interiorid, playerid, streamdistance, drawdistance);

#define CreateDynamicObject CreateDynamicObjectEx
Press CTRL+H and replace every "CreateDynamicObject" part then with "CreateDynamicObjectEx", make sure you don't clear this one. I haven't tested it completely, though I hope it works. Using such an idea, you can get the map icons also converted.


Re: [13:25:13] *** CreateDynamicObject: Expecting 12 parameter(s), but found 11 - ChristianIvann09 - 15.04.2014

Quote:
Originally Posted by Lordz™
Посмотреть сообщение
Use a custom function instead of the "CreateDynamicObject"
pawn Код:
stock CreateDynamicObjectEx(modelid, Float:x, Float:y, Float:z, Float:rx, Float:ry, Float:rz, worldid = -1, interiorid = -1, playerid = -1, Float:streamdistance = 200.0, Float:drawdistance = 200.0)
    return CreateDynamicObject(modelid, x, y, z, rx, ry, z, worldid, interiorid, playerid, streamdistance, drawdistance);

#define CreateDynamicObject CreateDynamicObjectEx
Press CTRL+H and replace every "CreateDynamicObject" part then with "CreateDynamicObjectEx", make sure you don't clear this one. I haven't tested it completely, though I hope it works. Using such an idea, you can get the map icons also converted.
Код:
C:\Users\Cris\Desktop\0.3z Server\Philippines Roleplay (2014) - Copy\gamemodes\VGRP.pwn(15993) : error 035: argument type mismatch (argument 10)
C:\Users\Cris\Desktop\0.3z Server\Philippines Roleplay (2014) - Copy\gamemodes\VGRP.pwn(18368) : error 035: argument type mismatch (argument 10)
C:\Users\Cris\Desktop\0.3z Server\Philippines Roleplay (2014) - Copy\gamemodes\VGRP.pwn(21681) : error 017: undefined symbol "worldid"
C:\Users\Cris\Desktop\0.3z Server\Philippines Roleplay (2014) - Copy\gamemodes\VGRP.pwn(21681) : error 029: invalid expression, assumed zero
C:\Users\Cris\Desktop\0.3z Server\Philippines Roleplay (2014) - Copy\gamemodes\VGRP.pwn(21681) : error 017: undefined symbol "interiorid"
C:\Users\Cris\Desktop\0.3z Server\Philippines Roleplay (2014) - Copy\gamemodes\VGRP.pwn(21681) : fatal error 107: too many error messages on one line

Compilation aborted.Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


6 Errors.
Код:
15993: 	mysteryegg = CreateDynamicObjectEx(19056, Position[0], Position[1], Position[2]-0.4, 0.0, 0.0, Position[3], -1, -1, -1, 200.0);
Код:
18368: object[f] = CreateDynamicObjectEx(GunObjects[gunid][0],ObjCoords[f][0],ObjCoords[f][1],ObjCoords[f][2]-1,93.7,120.0,120.0, GetPlayerVirtualWorld(playerid), GetPlayerInterior(playerid), -1, 100.0);
Код:
21681:  SetPVarInt(playerid, "pBoomBox", CreateDynamicObjectEx(2226, x, y, z, 0.0, 0.0, 0.0, .worldid = GetPlayerVirtualWorld(playerid), .interiorid = GetPlayerInterior(playerid)));