The following warnings occurred:
Warning [2] Use of undefined constant SAPI_NAME - assumed 'SAPI_NAME' (this will throw an Error in a future version of PHP) - Line: 3388 - File: inc/functions.php PHP 7.4.33-nmm7 (Linux)
File Line Function
/inc/functions.php 3388 errorHandler->error
/showthread.php 116 build_archive_link
Warning [2] Use of undefined constant IN_ARCHIVE - assumed 'IN_ARCHIVE' (this will throw an Error in a future version of PHP) - Line: 3331 - File: inc/functions.php PHP 7.4.33-nmm7 (Linux)
File Line Function
/inc/functions.php 3331 errorHandler->error
/inc/functions.php 3324 build_forum_breadcrumb
/showthread.php 195 build_forum_breadcrumb
Warning [2] Use of undefined constant IN_ARCHIVE - assumed 'IN_ARCHIVE' (this will throw an Error in a future version of PHP) - Line: 3331 - File: inc/functions.php PHP 7.4.33-nmm7 (Linux)
File Line Function
/inc/functions.php 3331 errorHandler->error
/showthread.php 195 build_forum_breadcrumb






Post Reply 
 
Thread Rating:
  • 0 Votes - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Transfer Function
Author Message
Coruja
Sphere Developer
*****

Posts: 987
Likes Given: 5
Likes Received: 226 in 187 posts
Joined: Jul 2012
Reputation: 7

Dimension Shard

Post: #3
RE: Transfer Function
if you want to move all backpack content to another packpack you must use CONT (which just change the item cont = move the item to another container) instead NEWITEM (which will create a new item)

also keep in mind that FINDLAYER always loop through all items equipped on player and only stop when it find the item on the layer X, so it's not a good idea use FINDLAYER inside FOR* loops, this will create a heavy loop and will waste server performance for no reason. To avoid this you can store the backpack UID just once (using REF1) before FORCONT starts. This will make FORCONT run moving the item directly to this backpack UID already defined (REF1) instead try to find the backpack UID again at each loop

Code:
[FUNCTION legend_transfer]
TARGETF f_legend_transfer

[FUNCTION f_legend_transfer]
REF1=<ARGO.FINDLAYER.layer_pack>
FORCONT <FINDLAYER.layer_pack>
  CONT=<REF1>
ENDFOR
11-26-2016 01:58 AM
Find all posts by this user Like Post Quote this message in a reply
Post Reply 


Messages In This Thread
Transfer Function - Llirik - 11-25-2016, 09:14 PM
RE: Transfer Function - Kanibal - 11-25-2016, 10:18 PM
RE: Transfer Function - Coruja - 11-26-2016 01:58 AM
RE: Transfer Function - Kanibal - 11-26-2016, 03:19 AM

Forum Jump:


User(s) browsing this thread: 2 Guest(s)