I sometimes get exit code 1796 with no other output, and sometimes it works properly. What is exit code 1796, and is there a way I can fix this?
Edit: I also sometimes get exit code NaN, but neither are very often
I am running this python code:
import random, time #Imports needed functions (Randomizer and time call)
starttime = time.time()
coins = 0
nearbyenemies = []
allenemies = [
#Follows pattern:
#[Level, Name, MinHealth, MaxHealth, MinAttack, MaxAttack, MinArmor, MaxArmor,
#Weakness, Resistance, Special, MinSpecialValue, MaxSpecialValue]
[1, 'Spike', 10, 15, 3, 5, 0, 0, 'None', 'None', 'Thorns', 3, 5],
[1, 'Skeleton', 10, 15, 5, 8, 5, 10, 'None', 'None', 'None', 0, 0],
[1, 'Ghost', 1, 1, 10, 15, 10, 15, 'None', 'None', 'None', 0, 0]
]
def nearby(minlevel, maxlevel, amount, add): #Adds nearby enemies between certain levels
global nearbyenemies
possibleEnemies = []
if add == True:
nearbyenemies = nearbyenemies
else:
nearbyenemies = []
x = 0
while x < len(allenemies):
if allenemies[x][0] >= minlevel & allenemies[x][0] <= maxlevel:
possibleEnemies.append( allenemies[x] )
x += 1
x = 0
while x < amount:
nearbyenemies.append( possibleEnemies[random.randint(0, len(possibleEnemies) - 1)] )
x += 1
nearby(1, 1, 2, False)
print(f'Enemies: {nearbyenemies}')