diff options
author | Jesusaves <cpntb1@ymail.com> | 2023-01-03 16:26:07 -0300 |
---|---|---|
committer | Jesusaves <cpntb1@ymail.com> | 2023-01-03 16:26:07 -0300 |
commit | 5ed5529ed540fa19a6dbbd061a52ec7c97d2f956 (patch) | |
tree | adca9b095cd566bbb7150b085c0b10597573d181 /npc | |
parent | da6dffb6547d439278b702a3239f6363baea384b (diff) | |
download | serverdata-5ed5529ed540fa19a6dbbd061a52ec7c97d2f956.tar.gz serverdata-5ed5529ed540fa19a6dbbd061a52ec7c97d2f956.tar.bz2 serverdata-5ed5529ed540fa19a6dbbd061a52ec7c97d2f956.tar.xz serverdata-5ed5529ed540fa19a6dbbd061a52ec7c97d2f956.zip |
Some missing errors and warnings from Bracco.
This does not apply if the recipe has no refundable items.
Diffstat (limited to 'npc')
-rw-r--r-- | npc/020-5/bracco.txt | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/npc/020-5/bracco.txt b/npc/020-5/bracco.txt index 3716642d6..240197798 100644 --- a/npc/020-5/bracco.txt +++ b/npc/020-5/bracco.txt @@ -31,7 +31,7 @@ if (.@item <= 0) { // target item not found consolebug("ERROR, INVALID ITEM ID DETECTED at NewMeltdown"); - return; + return 0; } // More shady code by gumi for (.@inv = 0; .@inv < 9; ++.@inv) { @@ -40,10 +40,12 @@ if (.@size < 0) { if (.@size == -1) { // recipe does not exist + consolebug("ERROR, INVALID RECIPE DETECTED at NewMeltdown"); return 0; break; } // inventory does not exist + consolewarn("INVENTORY ERROR at NewMeltdown"); return 0; break; } @@ -76,6 +78,11 @@ .@ammo = rand2(.@mini, .@maxi); + if (.@ammo < 1) { + .@ammo = 1; + consolewarn("AMOUNT ERROR at NewMeltdown: %s", getitemname(.@recipe_item)); + } + getitem .@recipe_item, .@ammo; mesc l("* Acquired @@ @@!", .@ammo, getitemlink(.@recipe_item)); } |