ODIN | Removing item using .ps script.

10/05/2016 17:27 Markiiee#1
Hello!

I've been working with pinescript and tried using the pinescript command (itemerase) to delete a specific item. After the script runs, the zone crashes where the instance is running on when it hits the part where itemerase comes.

Anyone knowing a solution to this? itemcreate works without issues when we renamed it, itemerase crashes the zone without an error.

Instance code:

Download link of the script: [Only registered and activated users can see links. Click Here To Register...]

Thanks in Advance!
10/06/2016 10:04 *Kaito#2
Remove the fk handle then it should work.

Btw ur ps changes looks badass and a few useless . Like, a man just write any shit in this ps and look what happen..
10/06/2016 19:23 Craineya#3
Kaito der Gott ist wieder am Start!! Kappa
10/06/2016 19:43 dragonhunter09#4
storing the playerhandles in five variables just to delete them one by one later...

the magic word is: "all" (itemerase all "ItemInx".)


the "waitlogin" is missing too...
so the script don't wait for players and just execute until the infinite loop is waiting for interrupt events.

so in my eyes the script is searching for players, maybe found one and the other findhandles fail. then you try to erase items from "null" variables (idk wether the response of a failed findhandle is really "null" or something else)
maybe this is the reason for the crash, not sure.

as Kaito said, please clean ur code, its poisioning our eyes^^
10/06/2016 23:19 Markiiee#5
The script was a basic DT script, with itemerase added. I'll check what you said in a minute and get back at you if it worked!

Also, we try to only remove one of the (for example) stackrd item which is 10. Like; you have 10 items, after you entered you only have 9 left.

And sorry for the bad code maybe, getting my way to still learn PS.
10/07/2016 09:39 *Kaito#6
Quote:
Originally Posted by Craineya View Post
Kaito der Gott ist wieder am Start!! Kappa
Für dich noch immer vater mein sohn.
10/07/2016 23:17 Markiiee#7
The pinescript got changed, But currently it removes All the items that have that Inx name.

How to make it so it only removes one of that item, instead of (for example) all 5?

Current code:
10/07/2016 23:52 dragonhunter09#8
itemerase all "TokenDT" 1.
10/08/2016 08:59 Markiiee#9
Tried that, still removes all items in the inventory with that inx.
10/08/2016 12:38 *Kaito#10
add me on skype. sykaito
10/09/2016 22:05 D0n!#11
Quote:
Originally Posted by dragonhunter09 View Post
itemerase all "TokenDT" 1.
Exactly tried that and a lot of other things along time ago but didn't get
it working. Maybe a bug within the zone or maybe it can't handle the third
argument.

Is that exactly something you got running?
10/09/2016 23:13 dragonhunter09#12
Quote:
Originally Posted by D0n! View Post
Is that exactly something you got running?
I dunno, thought it'll work... saw it with content search in scripts but never tried^^ just found a project with 4 different itemInx so maybe I had the same problem a long time ago.

in newer server I suggest lua, the lua function can substract one and it's possible to check wether the item is deletable or not (for those who want to log their cheeetaas^^)

As u said, the third parameter could be missing in the zone...