Hey can someone fix for me this code .. i use L2JFrozen latest version
===================================================================
--- head-src/com/l2jfrozen/gameserver/handler/itemhandlers/VipItem.java (revision 0)
+++ head-src/com/l2jfrozen/gameserver/handler/itemhandlers/VipItem.java (working copy)
@@ -0,0 +1,145 @@
+/*
+ * This program is free software: you can redistribute it and/or modify it under
+ * the terms of the GNU General Public License as published by the Free Software
+ * Foundation, either version 3 of the License, or (at your option) any later
+ * version.
+ *
+ * This program is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
+ * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
+ * details.
+ *
+ * You should have received a copy of the GNU General Public License along with
+ * this program. If not, see <http://www.gnu.org/licenses/>.
+ */
+package com.l2jfrozen.gameserver.handler.itemhandlers;
+
+import java.sql.Connection;
+import java.sql.PreparedStatement;
+import com.l2jfrozen.Config;
+import com.l2jfrozen.gameserver.handler.IItemHandler;
+import com.l2jfrozen.gameserver.model.actor.instance.L2ItemInstance;
+import com.l2jfrozen.gameserver.model.actor.instance.L2PcInstance;
+import com.l2jfrozen.gameserver.model.actor.instance.L2PlayableInstance;
+import com.l2jfrozen.util.CloseUtil;
+import com.l2jfrozen.util.database.L2DatabaseFactory;
+
+/**
+ * @author Crystalia
+ *
+ */
+public class VipItem implements IItemHandler
+{
+
+ private static final int ITEM_IDS[] = {
+ 6673
+ };
+
+ @Override
+ public int[] getItemIds()
+ {
+ return ITEM_IDS;
+ }
+
+ private void updateDatabase(L2PcInstance player, boolean newDonator)
+ {
+ Connection con = null;
+ try
+ {
+ // prevents any NPE.
+ // ----------------
+ if(player == null)
+ return;
+
+ // Database Connection
+ //--------------------------------
+ con = L2DatabaseFactory.getInstance().getConnection(false);
+ PreparedStatement stmt = con.prepareStatement(newDonator ? INSERT_DATA : DEL_DATA);
+
+ // if it is a new donator insert proper data
+ // --------------------------------------------
+ if(newDonator)
+ {
+ stmt.setInt(1, player.getObjectId());
+ stmt.setString(2, player.getName());
+ stmt.setInt(3, player.isHero() ? 1 : 0);
+ stmt.setInt(4, player.isNoble() ? 1 : 0);
+ stmt.setInt(5, 1);
+ stmt.execute();
+ stmt.close();
+ stmt = null;
+ }
+ else
+ // deletes from database
+ {
+ stmt.setInt(1, player.getObjectId());
+ stmt.execute();
+ stmt.close();
+ stmt = null;
+ }
+ }
+ catch(Exception e)
+ {
+ if(Config.ENABLE_ALL_EXCEPTIONS)
+ e.printStackTrace();
+
+
+ }
+ finally
+ {
+ CloseUtil.close(con);
+ }
+ }
+
+ // Updates That Will be Executed by MySQL
+ // ----------------------------------------
+ String INSERT_DATA = "REPLACE INTO characters_custom_data (obj_Id, char_name, hero, noble, donator) VALUES (?,?,?,?,?)";
+ String DEL_DATA = "UPDATE characters_custom_data SET donator = 0 WHERE obj_Id=?";
+
+ @Override
+ public void useItem(L2PlayableInstance playable, L2ItemInstance item)
+ {
+ if(!(playable instanceof L2PcInstance))
+ return;
+ L2PcInstance activeChar = (L2PcInstance)playable;
+
+ if(activeChar.isDonator())
+ {
+ activeChar.sendMessage("You are already a donator.You cannot use that item.");
+ return;
+ playable.destroyItem("Consume", item.getObjectId(), 1, null, false);
+ activeChar.setDonator(true);
+ updateDatabase(activeChar, true);
+ activeChar.sendMessage("Thanks for using our item in order to be server's donator.");
+ activeChar.broadcastUserInfo();
+
+
+ }
+
+}
\ No newline at end of file
Problem is :
[javac] C:\Users\George\workspace\trunk\gameserver\head-src\com\l2jfrozen\gameserver\handler\itemhandlers\VipItem.java:119: error: reached end of file while parsing
[javac] }
[javac] ^
[javac] 1 error
Does anyone have more information about bugs and errors in the Frozen review?
Any ideas?
Any help is welcome!
Modifications and corrections made
https://pastebin.com/vqYjM8ZH
Sorry if this is the wrong area.
Purchase Telegram Stars at a favorable price with minimal markup. New auctions from Telegram are expected, and our bot will help you prepare in advance.
Active links:
Telegram bot for purchasing Telegram Stars: Go to – fast and profitable purchase of Stars in Telegram.
Other services:
Digital goods store (Website): Go to
Store Telegram bot: Go to – convenient access to the store via the Telegram messenger.
Virtual numbers service: Go to
SMM Panel: Go to – promotion of your social media accounts.
We want to present to you the current list of promotions and special offers for purchasing products and services of our service:
1. You can use a promo code for your first purchase: SOCNET (15% discount)
2. Get $1 on your store balance or a 10–20% discount — just send your username after registering on our website using the following template: "SEND ME BONUS, MY USERNAME IS..." — you need to write this in our forum thread!
3. Get $1 for the first trial launch of the SMM Panel: just open a ticket with the subject “Get Trial Bonus” on our website (Support).
4. Weekly Telegram Stars giveaways in our Telegram channel and in our bot for purchasing stars!
News:
➡ Telegram channel: https://t.me/accsforyou_shop
➡ WhatsApp channel: https://chat.whatsapp.com/K8rBy500nA73z27PxgaJUw?mode=ems_copy_t
➡ Discord server: https://discord.gg/y9AStFFsrh
Contacts and support:
➡ Telegram: https://t.me/socnet_support
➡ WhatsApp: https://wa.me/79051904467
➡ Discord: socnet_support
➡ ✉ Email: solomonbog@socnet.store
Question
SQL Developer
Hey can someone fix for me this code .. i use L2JFrozen latest version
Problem is :
[javac] C:\Users\George\workspace\trunk\gameserver\head-src\com\l2jfrozen\gameserver\handler\itemhandlers\VipItem.java:119: error: reached end of file while parsing [javac] } [javac] ^ [javac] 1 error7 answers to this question
Recommended Posts