From 1754d290fffbc06ecaa31884aa8ae754725ec7a9 Mon Sep 17 00:00:00 2001 From: Jesusaves Date: Mon, 15 Jul 2019 00:40:56 -0300 Subject: Error handling on Bracco --- npc/020-5/bracco.txt | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'npc/020-5') diff --git a/npc/020-5/bracco.txt b/npc/020-5/bracco.txt index 3784ac6c7..1ff589ee0 100644 --- a/npc/020-5/bracco.txt +++ b/npc/020-5/bracco.txt @@ -25,6 +25,10 @@ getinventorylist(); .@item=@inventorylist_id[.@index]; + if (.@item <= 0) { + Exception(l("Error translating item ID @@ to @@ (Bracco, idx, id)", .@index, .@item), RB_DEFAULT|RB_SPEECH|RB_ISFATAL); + } + delitem .@item, 1; Zeny-=.@price; -- cgit v1.2.3-60-g2f50