Skip to content

Error In Python

Featured Replies

Hello guys, i have an error in python while i try to add subclass(custom quest) to a player. When his getting his subclass his level will get at level 40, the problem is that the error occurs at changing the level. Someone has an idea why?

 

error:

 

mTg18JV.png

 

code:

					try :
						ins.executeUpdate()
						ins.close()
						con.close()
					except : pass
					if resetskills(st) == 1: pass
					if ReqItems == True and not st.player.isGM() : st.takeItems(Item2_Req,Item2_Num)
					if DecLevel == True and not st.player.isGM() :
						pXp = st.player.getExp()
                                                tXp = Experience.LEVEL[NewLevel]
						if pXp > tXp: st.player.removeExpAndSp(pXp - tXp, 0)
					st.player.setClassId(int(event))
					if not st.player.isSubClassActive(): st.player.setBaseClass(int(event))
					st.player.store()
					st.player.broadcastUserInfo()
					return complete(st)
			    		st.exitQuest(1)

The code line error : tXp = Experience.LEVEL[NewLevel]

Edited by L2Mercury

  • Author

Solved by me :/, please close this topic.

Guest
This topic is now closed to further replies.

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.