Object reference not set to an instance of an object (TextMeshPro)

I’m trying to pick up a magazine and then have it disappear then display a certain amount of number on the screen. So when I try to pick up the magazine it doesn’t work and there’s a certain problem with the Object reference not set to the object here’s the code for the value to… Read More Object reference not set to an instance of an object (TextMeshPro)

Can I trust my global variables to always be preserved during screen rotation? (Android / Kotlin)

Is it bad practice to use Global variables instead of bundles to preserve state between screen rotations? I really like just using global variables to keep state. But since everything suggests using bundles, should I do that? I don’t know what pitfalls I could be thinking of. Here is a snippet of code that demonstrates… Read More Can I trust my global variables to always be preserved during screen rotation? (Android / Kotlin)

Python Progress Bar Is Showing An Extra %

So I was following a YouTube tutorial for a progress bar in python and when its done, an extra "%" appears. (NOTE: I changed a few variables in the code in order to have the needed product.) Video link: https://www.youtube.com/watch?v=x1eaT88vJUA&ab_channel=NeuralNine ` import math import colorama def progress_bar(progress, total, color=colorama.Fore.YELLOW): percent=100 * (progress / float(total)) bar=’■’… Read More Python Progress Bar Is Showing An Extra %

the background color of my program is only visable when I close the app icon

I have an app icon open but I can’ see a white background in my application window untill I close the app. What do I do? import pygame # Internationalizing Pygame pygame.init() # Title and Icon pygame.display.set_caption("Space Invaders") icon = pygame.image.load() pygame.display.set_icon(icon) # player playerIMG = pygame.image.load() playerX = 370 playerY = 30 screen =… Read More the background color of my program is only visable when I close the app icon

I want to make my coin dissapear when my player collides with it but code doesn't work

I just started coding so i still have so much to learn. Unity doesn’t give any error when I play the game but also nothing happenes when the player touches the gold. I want the gold to dissapear when the playes touches it but I don’t know why it doesn’t work. (collision part is the… Read More I want to make my coin dissapear when my player collides with it but code doesn't work