Browse Source

*eAAC Update to donation girl. [erKURITA]

git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@7461 54d463be-8e91-2dee-dedb-b68131a5f0ec
eaac 19 years ago
parent
commit
67e00b4d53
1 changed files with 3 additions and 1 deletions
  1. 3 1
      npc/custom/eAAC_Scripts/DonationGirl/donate.txt

+ 3 - 1
npc/custom/eAAC_Scripts/DonationGirl/donate.txt

@@ -21,6 +21,8 @@
 //=	  with decimals.
 //=	  with decimals.
 //= 3.1 - Added quotes to some queries, fixed a variable and
 //= 3.1 - Added quotes to some queries, fixed a variable and
 //=	  removed a comment.
 //=	  removed a comment.
+//= 3.2 - Fixed a problem where eAthena would crash if a
+//=	  query returned NULL.
 //===== Compatible With =====================================
 //===== Compatible With =====================================
 //= eAthena - any version that contains the escape_sql
 //= eAthena - any version that contains the escape_sql
 //=	      function (Stable 6299 OR Trunk 6262)
 //=	      function (Stable 6299 OR Trunk 6262)
@@ -143,7 +145,7 @@ close;
 
 
 L_STATS:
 L_STATS:
 mes "[Donation Girl]";
 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$+"";
 mes "Our fund is at a total of $"+@total$+"";
 next;
 next;
 menu "More info",L_INFO,"Make a claim",L_CHECK,"Statistics",L_STATS;
 menu "More info",L_INFO,"Make a claim",L_CHECK,"Statistics",L_STATS;