
u/ImAlekzzz

Personal opinion: the menu music is kinda *creepy*
Like you are awake, it’s dark outside, lights out, nothing to hear but the fan, a blue screen blasting and if you are not in front you get blasted with the horror, this is the type of music I expect to hear in an dark room before getting stabbed with a 3.75-inch Buck 110 folding knife, 114 times
(accessing variable outside of functions) im so confused...
i have came across of return for when i use the function to fill a variable, and normally i use global xxx. but now i cant find a way and its messing with my brain, here is the code:
**def** json(what,why):
**global** jsoniv
**with open**("xxxx.json", "r", encoding="utf-8") **as** file:
jsoniv = json.load(file)
when i try print(jsoniv) i get NameError: name 'jsoniv' is not defined. Did you mean: 'json'?. can someone please help me?
Why is there a safe for children rule when Reddit is 13 plus?
Like I don’t get it, Reddit is a 13+ platform, and this subreddit says to not say stuff that isn’t good “for the kids”, so it encouraging breaking reddits rules? I need a lot of explanation. And also kids already know how to swear better than some adults but this subreddit will make a problem, search engine results also don’t count because they are most defiantly going to encounter a YouTube video or a guide
How can I make a ai opponent?
It’s 2 hit boxes, the “player” and the “ai” how can I make the ai able to jump obstacles and attack the player if within range? If someone wants to see what I already have can tell me
Why?
I have started a competition with a friend, I have reached my goals and still don’t have 700 points but he has, why?
I finally am ready to buy a ps vita, and now the market has been fucked. Like before I could find vitas for 100 bucks completely working no problem but now eBay is filled with 200 vitas for parts and repairs, like I’m not going to spend that much for a 14 yo console, and no I’m not going to buy from Japan cause my country has crazy import fees
You don’t believe how many people tell me to download either and I just nudge it off but I’m honestly unable to talk with ppl because I do t use one of those services is there an answer?
I want to make my first no ai python project after a while, its going to be a fetching app, well while codeing i encountered a problem and i cant find a way to fix it
def ChangeColors():
same_color = input("Do you want to use the same colors for all headers? [Y/n]")
if same_color == "Y" or same_color == "y" or same_color == "":
charactername = ""
assignedcolor = SelectColor()
colors.namec = assignedcolor
colors.cpuc = assignedcolor
elif same_color == "N" or same_color == "n":
charactername = " for the \"Name\" header"
colors.namec = SelectColor()
charactername = " for the \"CPU\" header"
colors.cpuc = SelectColor()
else:
ChangeColors()
def SelectColor():
global charactername
global colors
colors.change = True
colorselect = input(f"Please enter the color name{charactername}, use the 16 supported colors, for help enter \"help\"")
return colorselect
when i run it i get:
UnboundLocalError: cannot access local variable 'SelectColor' where it is not associated with a value
why? can someone help me???