-1

Hi im trying to write a game. Its very early stage but i hit to an error so need your help. Here the code:

def gexp():
	connection = sqlite.connect('test.db')
	memoryConnection = sqlite.connect(':memory:')
	cursor = connection.cursor() 
	
	cursor.execute('SELECT * FROM gain')
	expget = cursor.fetchone()
	exp = expget[1]

	texp = expget[1] + mexp
	cursor.execute('INSERT INTO gain VALUES (null, ?)',(texp))
	cursor.commit()
	print "Your exp is %s" %texp

mexp is another value from another db. i took it from upper function with global. both values are integer but still i got unspoorted type error. value ? also integer so cant understand the problem.

1
Contributor
1
Reply
2
Views
8 Years
Discussion Span
Last Post by mhangman
This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.