var t = db.query_result
Then I use this in a for with multiple other queries which change the value of t, but I want to set it at the value of my first query? How do I set t at db.query_result and make it not change afterwards when I make other queries?
func setTuto1():#
db.open_db()
db.query("select ID from currentTutorialMap where LandTextureType = 'Stone0';")
var t = db.query_result
print(t)
print(t.size())
print(t[1]["ID"])
for i in range(0, t.size()):
var x = rng.randi_range(0, 6)
if x==0:
db.query("update currentTutorialMap set LandTextureIndex = 10 where ID == %d;" % t[i]["ID"])
elif (x==1 or x==2):
db.query("update currentTutorialMap set LandTextureIndex = 9 where ID == %d;" % t[i]["ID"])
elif (x==3 or x==4):
db.query("update currentTutorialMap set LandTextureIndex = 11 where ID == %d;" % t[i]["ID"])
elif (x==5 or x==6):
db.query("update currentTutorialMap set LandTextureIndex = 12 where ID == %d;" % t[i]["ID"])