• 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!

sprite is constant

RizbIT

Member
in a gms 1 project i had local variablkes called 'sprite' used to assign value when adding new sprite.

imported into gms 2 and i get compil errors 'cannot set a constant to a value'

does this mean that sprite is now a constant in gms2? can it be unset as a constant anyway?


ISSUE RESOLVED ******
 
Last edited:
H

Homunculus

Guest
There's no such built in constant in GMS2. Maybe it's a resource name, or something you defined as a macro / enum.
 

RizbIT

Member
ive checked again i get the error:
Object: visual_back Event: User Event 0 at line 9 : Cannot set a constant to a value
On this line of code:
Code:
sprite2=sprite_create_from_surface(sur,0,0,sprite_get_height(sprite1),sprite_get_width(sprite1),0,0,0,0);



ISSUE RESOLVED ******
I had imported new extension from marketplace and it automatically imported sprite and object resources some had same name as some local variabkes, like sprite1 and sprite2.
 
Last edited:
Top