Fangames > Engines
I Wanna Be the Engine KS Edition (For GMStudio)
RandomFangamer:
Ok, so a bit of a weird issue,
I have a number object which takes a variable from its creation code and uses it to pick a sprite
However, GM:S says that the variable isn't specified
Code:
(click to show/hide)if number = 1{
sprite_index = spr1Sign
}
if number = 2{
sprite_index = spr2Sign
}
Error:
(click to show/hide)
___________________________________________
############################################################################################
FATAL ERROR in
action number 1
of Create Event
for object objNumber:
Push :: Execution Error - Variable Get 100325.number(100122, -2147483648)
at gml_Object_objNumber_CreateEvent_1 (line 2) - if number = 1{
############################################################################################
Stepcore:
Think you need to create the variable before Game Maker can compare it.
Like number=1 or something in the create event.
RandomFangamer:
Thanks, I put that above my code (line1) but I'm still getting an issue
For some reason the game is still ignoring the Creation Code and now believes that the variable is 1 although here I specified that it was 2
This worked fine in 8.0, o could it be a problem with studio?
Stepcore:
I get this when I press new game in v0.9
(click to show/hide)Also I just did a fresh download of v0.8 from here https://klazen.com/IWBTG/archive/IWBT%20Engine%20KS%20Edition%20v0.8.zip and I still get the same issue as described above :< Still no walkoff aligns, hitting spikes through blocks and 2block no work.
Version 1.4.1598 of GM:S
--- Quote from: RandomFangamer on July 14, 2015, 09:46:23 AM ---Thanks, I put that above my code (line1) but I'm still getting an issue
For some reason the game is still ignoring the Creation Code and now believes that the variable is 1 although here I specified that it was 2
This worked fine in 8.0, o could it be a problem with studio?
--- End quote ---
Welp. Looks like they swapped that around for GM:S, my bad.
https://gmc.yoyogames.com/index.php?showtopic=627879
Seems like the way to get around it is to run it after the create event. So you can do an alarm[0]=1 and run it there. Or you can run an event_user(0) in the creation code. Or use a bool and do a begin step that checks and sets it to false (probably not so good).
Otherwise I don't know :S
RandomFangamer:
Hey, it works!!! :tenKapple:
Navigation
[0] Message Index
[#] Next page
[*] Previous page
Go to full version