SA-MP Forums Archive
Problem with CreateDynamicPickup - 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: Problem with CreateDynamicPickup (/showthread.php?tid=630874)



Problem with CreateDynamicPickup - Type-R - 19.03.2017

Hello everybody, i have a weird issue on my hands right now. So i have a line like this:
Код:
	HouseInteriors[i][intPickup] = CreateDynamicPickup(1318, 1, HouseInteriors[i][intX], HouseInteriors[i][intY], HouseInteriors[i][intZ], .interiorid = HouseInteriors[i][intID]);
errors i get:
Код:
FunZoneLT\filterscripts\ADMINAS.pwn(3525) : error 017: undefined symbol "interiorid"
FunZoneLT\filterscripts\ADMINAS.pwn(3525) : warning 215: expression has no effect
FunZoneLT\filterscripts\ADMINAS.pwn(3525) : error 001: expected token: ";", but found ")"
FunZoneLT\filterscripts\ADMINAS.pwn(3525) : error 029: invalid expression, assumed zero
FunZoneLT\filterscripts\ADMINAS.pwn(3525) : fatal error 107: too many error messages on one line
While this line for CreateDynamic3DTextLabel works beautifully and does not get me errors: (same thing is used with .interiord):

Код:
HouseInteriors[i][intLabel] = CreateDynamic3DTextLabel("Iseiti is namo", 0xE67E22FF, HouseInteriors[i][intX], HouseInteriors[i][intY], HouseInteriors[i][intZ]+0.35, 10.0, .testlos = 1, .interiorid = HouseInteriors[i][intID]);
Does anyone have an idea, why its giving me an error Thank you.


Re: Problem with CreateDynamicPickup - Luis- - 19.03.2017

Try it without .interiorid

pawn Код:
HouseInteriors[i][intPickup] = CreateDynamicPickup(1318, 1, HouseInteriors[i][intX], HouseInteriors[i][intY], HouseInteriors[i][intZ], HouseInteriors[i][intID]);



Re: Problem with CreateDynamicPickup - Type-R - 19.03.2017

It does work, the other way but the issue with that is that:
Код:
 CreateDynamicPickup(modelid, type, Float:x, Float:y, Float:z, worldid = -1, interiorid = -1, playerid = -1, Float:streamdistance = STREAMER_PICKUP_SD, STREAMER_TAG_AREA areaid = STREAMER_TAG_AREA -1, priority = 0);
This is how the original function looks like. So my interiorid info, is in the worldid part. I think that .interiorid makes it jump to the place that i need it to be. Or am i wrong?


Re: Problem with CreateDynamicPickup - Luis- - 19.03.2017

I'm not actually sure about that, I've never encountered that myself. I normally just set the worldid then set the interiorid.


Re: Problem with CreateDynamicPickup - dakata994 - 19.03.2017

Try

Код:
HouseInteriors[i][intPickup] = CreateDynamicPickup(1318, 1, HouseInteriors[i][intX], HouseInteriors[i][intY], HouseInteriors[i][intZ], 0, HouseInteriors[i][intID]);