JWH 6 Опубликовано 26 июня, 2013 Ошибка C:\FrozenDEV\gameserver\data\scripts\custom\9990_buffer\__init__.py Traceback (innermost last): (no code object) at line 0 at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:1073) at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:987) at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:982) at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:927) at com.mysql.jdbc.ResultSetImpl.checkRowPos(ResultSetImpl.java:841) at com.mysql.jdbc.ResultSetImpl.getStringInternal(ResultSetImpl.java:565 6) at com.mysql.jdbc.ResultSetImpl.getString(ResultSetImpl.java:5576) at com.mysql.jdbc.ResultSetImpl.getString(ResultSetImpl.java:5616) at com.mchange.v2.c3p0.impl.NewProxyResultSet.getString(NewProxyResultSe t.java:3342) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) at java.lang.reflect.Method.invoke(Unknown Source) java.sql.SQLException: java.sql.SQLException: Illegal operation on empty result set. at org.python.core.Py.JavaError(Unknown Source) at org.python.core.PyObject._jthrow(Unknown Source) at org.python.core.PyObject._jcall(Unknown Source) at org.python.proxies.main$Quest$43.onEvent(Unknown Source) at com.l2jfrozen.gameserver.model.quest.Quest.onAdvEvent(Quest.java:744) at com.l2jfrozen.gameserver.model.quest.Quest.notifyEvent(Quest.java:551 ) at com.l2jfrozen.gameserver.model.actor.instance.L2PcInstance.processQue stEvent(L2PcInstance.java:2513) at com.l2jfrozen.gameserver.network.clientpackets.RequestBypassToServer. runImpl(RequestBypassToServer.java:326) at com.l2jfrozen.gameserver.network.clientpackets.L2GameClientPacket.run (L2GameClientPacket.java:77) at com.l2jfrozen.gameserver.network.L2GameClient.run(L2GameClient.java:1 189) at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source) at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source) at java.lang.Thread.run(Unknown Source) Скрипт import sys from com.l2jfrozen.util.database import L2DatabaseFactory from com.l2jfrozen.gameserver.model.quest import State from com.l2jfrozen.gameserver.model.quest import QuestState from com.l2jfrozen.gameserver.model.quest.jython import QuestJython as JQuest from com.l2jfrozen.gameserver.model.actor.instance import L2PcInstance from com.l2jfrozen.gameserver.model import L2Skill from java.util import Iterator from com.l2jfrozen.gameserver.datatables import SkillTable qn = "9990_buffer" NPC = [404040] ACCEPT_BUFF = [1040, 1068, 1035, 1043, 1044, 1077, 1078, 1085, 1268, 1032, 1036, 1045, 1048, 4352, 1086, 4391, 4403, 4405, 1243, 1388, 1389, 1087, 1059, 1413, 1363, 1356, 1355, 1357] ACCEPT_DANCES = [271, 274, 275, 310, 272, 273, 276, 365, 277] ACCEPT_SONGS = [269, 264, 304, 267, 265, 363, 349, 364, 305, 266, 268] ACCEPT_CHANTS = [] ACCEPT_SPECIAL = [] ACCEPT_RESISTS = [] QuestId = -1 QuestName = "Buffer" QuestDesc = "custom" print qn + "" class Quest (JQuest) : def __init__(self,id,name,descr): JQuest.__init__(self,id,name,descr) def onEvent(self, event, st): htmltext = "Sory, failed Event" ownerid = st.getPlayer().getObjectId() effects = st.getPlayer().getAllEffects() if event.startswith("page_") : page = int(event.replace("page_", "")) htmltext = str(page) + ".htm" elif event == "cancel" : st.getPlayer().stopAllEffects() htmltext = "1.htm" activePage = 1 elif event == "reloadcp": st.getPlayer().restoreCP() return "1.htm" st.setState(State.COMPLETED) elif event == "reloadhp": st.getPlayer().setCurrentHp(st.getPlayer().getMaxHp()) return "1.htm" st.setState(State.COMPLETED) elif event == "reloadmp": st.getPlayer().setCurrentMp(st.getPlayer().getMaxMp()) return "1.htm" st.setState(State.COMPLETED) elif event.startswith("buff_") : id_lvl = event.replace("buff_", "") id_lvl = id_lvl.split("_") SkillTable.getInstance().getInfo(int(id_lvl[0]), int(id_lvl[1])).getEffects(st.getPlayer(), st.getPlayer()) htmltext = str(int(id_lvl[2])) + ".htm" elif event.startswith("profile_") : act = event.replace("profile_", "") con = L2DatabaseFactory.getInstance().getConnection() if act.startswith("buff_") : act = str(int(act.replace("buff_", ""))) sql = con.prepareStatement("SELECT * FROM profile_buff WHERE char_id = ? AND pindex = ?") sql.setInt(1, int(ownerid)) sql.setInt(2, int(act)) rs = sql.executeQuery() rs.next() full_buffs = rs.getString("skills").split(";") sql.close() rs.close() for buff in full_buffs : if buff != "" : buff = buff.split(",") SkillTable.getInstance().getInfo(int(buff[0]), int(buff[1])).getEffects(st.getPlayer(), st.getPlayer()) htmltext = "1.htm" elif act.startswith("save_") : act = str(int(act.replace("save_", ""))) sqll = con.prepareStatement("DELETE FROM profile_buff WHERE char_id = ? AND pindex = ?") sqll.setInt(1, int(ownerid)) sqll.setInt(2, int(act)) sqll.execute() sqll.close() saving = "++" for eff in effects : eff_id = eff.getSkill().getId() eff_level = eff.getSkill().getLevel() if saving == "++" : if (eff_id in ACCEPT_BUFF or eff_id in ACCEPT_DANCES or eff_id in ACCEPT_SONGS or eff_id in ACCEPT_CHANTS or eff_id in ACCEPT_SPECIAL or eff_id in ACCEPT_RESISTS) : saving = str(eff_id) + "," + str(eff_level) + ";" else : if (eff_id in ACCEPT_BUFF or eff_id in ACCEPT_DANCES or eff_id in ACCEPT_SONGS or eff_id in ACCEPT_CHANTS or eff_id in ACCEPT_SPECIAL or eff_id in ACCEPT_RESISTS) : saving += str(eff_id) + "," + str(eff_level) + ";" sql = con.prepareStatement("INSERT INTO profile_buff (char_id, pindex, skills) VALUES ('" + str(ownerid) + "', '" + str(act) + "', '" + saving + "')") sql.execute() sql.close() htmltext = "8.htm" con.close() return htmltext def onTalk (self, npc, player): htmltext = "<html><head><body>I have nothing to say to you</body></html>" st = player.getQuestState(qn) if not st : return htmltext npcId = npc.getNpcId() return htmltext QUEST = Quest(QuestId, qn, QuestDesc) CREATED = State('Start', QUEST) STARTED = State('Started', QUEST) COMPLETED = State('Completed', QUEST) QUEST.setInitialState(CREATED) for npcId in NPC: QUEST.addStartNpc(npcId) QUEST.addTalkId(npcId) Профиль бафа. При не сохраненном профиле нажимаю бафнуть выдает вот такую ошибку в гс и в игре Script Error. Очень мешает помогите. Что нужно дописать?? Поделиться сообщением Ссылка на сообщение Поделиться на другие сайты