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
Delete item based in uid
Author Message
pushim
Journeyman
*

Posts: 60
Likes Given: 20
Likes Received: 2 in 2 posts
Joined: Dec 2013
Reputation: 0



Post: #1
Delete item based in uid
if i wish delete a item, but using the UID, how do this?
03-25-2015 01:47 PM
Find all posts by this user Like Post Quote this message in a reply
azmanomer
Journeyman
*

Posts: 139
Likes Given: 4
Likes Received: 18 in 16 posts
Joined: Nov 2013
Reputation: 1



Post: #2
RE: Delete item based in uid
uid.<blabla>.remove

blabla is the uid of item
03-25-2015 05:21 PM
Find all posts by this user Like Post Quote this message in a reply
[+] 1 user Likes azmanomer's post
pushim
Journeyman
*

Posts: 60
Likes Given: 20
Likes Received: 2 in 2 posts
Joined: Dec 2013
Reputation: 0



Post: #3
RE: Delete item based in uid
Perfect thx Smile
03-25-2015 08:23 PM
Find all posts by this user Like Post Quote this message in a reply
JohnVeritas
Apprentice
*

Posts: 49
Likes Given: 0
Likes Received: 4 in 4 posts
Joined: Feb 2014
Reputation: 2



Post: #4
RE: Delete item based in uid
Item uid remover;

Code:
[FUNCTION iur]
FORITEMS 6144 //once again it checks the entire map
    IF (<uid> == <ARGS>) //if this arguement is met
        REMOVE //remove it
    ENDIF //end the IF arguement
ENDFOR //end the FOR loop

If you knew the uid that you want to remove just type .iur <uid> this function will be delete typed uid automaticly (only items). If you want to remove chars with this script just change foritems to forchars.
03-27-2015 08:44 AM
Find all posts by this user Like Post Quote this message in a reply
an0n!m0use
Journeyman
*

Posts: 56
Likes Given: 16
Likes Received: 0 in 0 posts
Joined: Feb 2013
Reputation: 0



Post: #5
RE: Delete item based in uid
Code:
[FUNCTION removeitem]
FORINSTANCES <ARGS>
REMOVE
SERV.LOG <ARGS>, <AMOUNT> has been REMOVED.
ENDFOR
    
[FUNCTION removeitem_2] // without DEFNAME
FORITEM <SERV.ITEMS>
IF <BaseID>==<ARGS>
    REMOVE
ENDIF
ENDFOR
03-27-2015 06:12 PM
Find all posts by this user Like Post Quote this message in a reply
Coruja
Sphere Developer
*****

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

Dimension Shard

Post: #6
RE: Delete item based in uid
you can use FOR* loop if you need to delete many items based on same DISPID / BASEID / NAME / whatever

but to delete just 1 item you doesn't need loop through all items/chars, just use directly UID.<uid_here>.REMOVE
03-29-2015 05:06 PM
Find all posts by this user Like Post Quote this message in a reply
Post Reply 


Forum Jump:


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