• Hey Guest! Ever feel like entering a Game Jam, but the time limit is always too much pressure? We get it... You lead a hectic life and dedicating 3 whole days to make a game just doesn't work for you! So, why not enter the GMC SLOW JAM? Take your time! Kick back and make your game over 4 months! Interested? Then just click here!

(SOLVED) Error again and again

N

NizarPlayz

Guest
So i always get an error when i start my game
___________________________________________
ERROR in
action number 1
of Other Event: Game Start
for object playerskin:

Trying to replace non-existing sprite.
How can i fix this? for object info here:
An object i have made which allows a player customize player skin
this is my code if file_exists(working_directory + "\themes\playerskin.png") sprite_replace(playerskin, working_directory + "\themes\playerskin.png", 1, false, false, 0, 0); tell me if i have done something wrong?
and whenever i put my other skin in the themes folder it still doesn't changes any help in this?
 
N

NizarPlayz

Guest
all info about my object Name playerskin event:game start code:if file_exists(working_directory + "\themes\playerskin.png") sprite_replace(playerskin, working_directory + "\themes\playerskin.png", 1, false, false, 0, 0); what does it do:it allows a player to customize player skin
 

Roderick

Member
The problem isn't with an object named playerskin, it's with a SPRITE named playerskin. Make sure you have a sprite named playerskin in your resource tree, even if it's just a blank one. You can't change it until after it's created.
 
N

NizarPlayz

Guest
The problem isn't with an object named playerskin, it's with a SPRITE named playerskin. Make sure you have a sprite named playerskin in your resource tree, even if it's just a blank one. You can't change it until after it's created.
congrats for 100h century for posts + i have already have the sprite named playerskin
 
N

NizarPlayz

Guest
NizarPlayz video would help.. Do you have draw event? if you have did you draw self?
ok can you wait i will have to post the video on youtube it will explain everything what i have done and what is working and what is not i'll be right back when video is uploaded
 
H

Homunculus

Guest
if you have an object name playerskin, you can't have a sprite with the same name. And if you do, you HAVE to call one of them differently
 
N

NizarPlayz

Guest
if you have an object name playerskin, you can't have a sprite with the same name. And if you do, you HAVE to call one of them differently
You sir are a Game Saver! Thank you that worked for me
 

Dagoba

Member
It should be by default by adding prefix for sprite as "spr_", for object "obj_", for sound "snd_" and whatever you prefer, this avoids errors like one you're facing at this moment.
 
H

Homunculus

Guest
Glad it's solved, but please, for the sake of everyone, limit your double posting. If you get an advice and want to try it, don't write "I'll try and see", just do it and report the results.

It's a forum, not a chat, nobody will get mad if you don't reply instantly (quite the contrary in fact if you machine-gun post)
 
Last edited by a moderator:
Top