From f42d3cac328f48c5b73adbb7554c26894988be54 Mon Sep 17 00:00:00 2001 From: eaac Date: Mon, 3 Jul 2006 22:53:27 +0000 Subject: *eAAC Update to donation girl. [erKURITA] git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@7461 54d463be-8e91-2dee-dedb-b68131a5f0ec --- npc/custom/eAAC_Scripts/DonationGirl/donate.txt | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/npc/custom/eAAC_Scripts/DonationGirl/donate.txt b/npc/custom/eAAC_Scripts/DonationGirl/donate.txt index 99a2776f1..b22498289 100644 --- a/npc/custom/eAAC_Scripts/DonationGirl/donate.txt +++ b/npc/custom/eAAC_Scripts/DonationGirl/donate.txt @@ -21,6 +21,8 @@ //= with decimals. //= 3.1 - Added quotes to some queries, fixed a variable and //= removed a comment. +//= 3.2 - Fixed a problem where eAthena would crash if a +//= query returned NULL. //===== Compatible With ===================================== //= eAthena - any version that contains the escape_sql //= function (Stable 6299 OR Trunk 6262) @@ -143,7 +145,7 @@ close; L_STATS: mes "[Donation Girl]"; -query_sql "SELECT SUM(amount) FROM `donate`", @total$; +query_sql "SELECT IFNULL((SELECT SUM(amount) FROM `donate`),0)", @total$; mes "Our fund is at a total of $"+@total$+""; next; menu "More info",L_INFO,"Make a claim",L_CHECK,"Statistics",L_STATS; -- cgit v1.2.3-60-g2f50