SA-MP Forums Archive
Pickup Problem - 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)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: Pickup Problem (/showthread.php?tid=226146)



Pickup Problem - Antonio [G-RP] - 15.02.2011

I know somebody had an almost identical problem to mine, but I haven't been able to find an answer.

The problem is, it creates the first pickup, but fails to create the second.

pawn Код:
TeleportPickup[id][0] = CreatePickup(1318, 1, pos_x, pos_y, pos_z, vw);
    TeleportPickup[id][1] = CreatePickup(1318, 1, topos_y, topos_y, topos_z, tovw);



Re: Pickup Problem - JamesC - 15.02.2011

Please learn to debug.. If you're offering professional scripting services you should know how to debug your own code...

if( TeleportPickup[id][1] == -1 ) print( "Pickup 2 was not created." );

^ You do that because there is nothing wrong with your syntax. If it prints Pickup 2 was not created, reply. Else check if something else could be effecting it.


Re: Pickup Problem - Backwardsman97 - 15.02.2011

TeleportPickup[id][1] = CreatePickup(1318, 1, topos_y, topos_y, topos_z, tovw);

See the error in your ways?


Re: Pickup Problem - Antonio [G-RP] - 15.02.2011

Quote:
Originally Posted by JamesC
Посмотреть сообщение
Please learn to debug.. If you're offering professional scripting services you should know how to debug your own code...

if( TeleportPickup[id][1] == -1 ) print( "Pickup 2 was not created." );

^ You do that because there is nothing wrong with your syntax. If it prints Pickup 2 was not created, reply. Else check if something else could be effecting it.
Alright. Thanks.


Quote:
Originally Posted by Backwardsman97
Посмотреть сообщение
TeleportPickup[id][1] = CreatePickup(1318, 1, topos_y, topos_y, topos_z, tovw);

See the error in your ways?
Lmao. Thanks for pointing that out, I can't believe I missed it.