possible GMS2.2.5.481 bug

D

debugMaster

Guest
I wrote the code:
if(obj_player) place_meeting(163,345,self)
{
image_index = 1;
}
if(obj_player) not place_meeting(163,345,self)
{
image_index = 0;
}
and for some reason it says assignment operator expected and malformed statement both on line 7
any ideas?
 

chamaeleon

Member
I wrote the code:
if(obj_player) place_meeting(163,345,self)
{
image_index = 1;
}
if(obj_player) not place_meeting(163,345,self)
{
image_index = 0;
}
and for some reason it says assignment operator expected and malformed statement both on line 7
any ideas?
It's complaining because it is completely incorrect GML if statement syntax (and probably a poor understanding of how to use place_meeting() as well).
 

FoxyOfJungle

Kazan Games
This is not a bug, you forgot to put "not" in the first line of your code, and your code is very confused. This would be the correct: (If that's what you're trying to do, I guess)
GML:
if place_meeting(x,y,obj_player)
{
    image_index = 1;
}
else
{
    image_index = 0;
}
or:
GML:
image_index = place_meeting(x,y,obj_player);

I don't understand why you used 163 and 345 as coordinates
 
Last edited:

chamaeleon

Member
This is not a bug, you forgot to put "not" in the first line of your code
More than likely this is not true. My guess is that a properly written piece of code that does what @debugMaster wants will not require the not keyword in it at all once all is said and done, rather it should be an else clause in the mix instead.
 
Top