what the error?!

if keyboard_check(ord('C')) && duck=false{    if dir="right"{        if (!place_free(x,y+1)){            draw_sprite(spr_charFBr,-1,x,y)            instance_create(x,y,FBr)}        else instance_create(x,y,FBr)}    if dir="left"{        if (!place_free(x,y+1)){            draw_sprite(spr_charFBl,-1,x,y)            instance_create(x,y,FBl)}        else instance_create(x,y,FBl)}}

all it does is spawn fireballs constantly to both the left and right

help? X.x;;


ok, now they spawn left and right when i hold down the C key
so i guess im getting there?


now the fireballs spawn in the direction the character is facing
but only while the C key is held

i need some control on these things

one fireball at a time!


still very errored

Well, the first thing to do is make it readable. X_x

[code]if (keyboard_check_pressed(‘C’) && duck == false)
   if (dir == “right”)
       if (!place_free(x,y+1))
   else instance_create(x,y,FBr);

   if (dir == “left”)
       if (!place_free(x,y+1))
   else instance_create(x,y,FBl);
Ah, can you see why now? The main problem is in those “else” statements. If you’re not facing right, it shoots out a right fireball. If you aren’t facing left, it shoots out a left fireball.

yeah, i had brackets in the wrong place ^^;;
thats what i get for working quickly xD