+Gemintronic #1 Posted June 29, 2013 I'm repeatedly stumbling on a phenomenon where bitwise operations fail to register properly if on a line with multiple statements. So, THIS wont work: ( note bdir is a define "def bdir=moreattr{0}" ) movebullet if ballx = 0 then ballx = player1x : bally = (player1y+4) : if player0x > player1x then bdir = 1 else bdir = 0 if bdir then ballx = ballx + 1 else ballx = ballx - 1 goto after_rise but, THIS does: movebullet if ballx = 0 then goto setballdir after_setballdir if bdir then ballx = ballx + 1 else ballx = ballx - 1 goto after_rise setballdir ballx = player1x : bally = (player1y+4) if player0x > player1x then bdir = 1 else bdir = 0 goto after_setballdir Quote Share this post Link to post Share on other sites
+Random Terrain #2 Posted June 29, 2013 Have you tried your first version without using def? You might want to see if there is a difference. Quote Share this post Link to post Share on other sites
+Gemintronic #3 Posted June 29, 2013 Have you tried your first version without using def? You might want to see if there is a difference. Thanks R.T. I might try that. It would REALLY suck if I had to not use defines, though. "attribute{4}" tells me nothing whereas "def ismariobig=attribute{4}" tells me everything. Quote Share this post Link to post Share on other sites
+Random Terrain #4 Posted June 29, 2013 Thanks R.T. I might try that. It would REALLY suck if I had to not use defines, though. "attribute{4}" tells me nothing whereas "def ismariobig=attribute{4}" tells me everything. Yeah, it would really help to know if it's bit operations or def. I had all kinds of random troubles with def, so I quit using it. When using bit operations, I do stuff like this: dim _Bit0_Reset_Restrainer = t dim _Bit1_FireB_Restrainer = t dim _Bit2_Direction_Changed = t Here's a tiny line of code showing one in use: if !joy0fire then _Bit1_FireB_Restrainer{1} = 0 : goto __Skip_Fire Having the bit number in the name tells me what number to use and the rest of the name is descriptive, so I don't even miss def. 1 Quote Share this post Link to post Share on other sites
bogax #5 Posted June 29, 2013 this statement movebullet if ballx = 0 then ballx = player1x : bally = (player1y+4) : if player0x > player1x then bdir = 1 else bdir = 0 behaves kinda like the else clause belongs to both if staments movebullet_ if ballx = 0 then ballx = player1x : bally = (player1y+4) : if player0x > player1x then bdir = 1 : goto skip bdir = 0 skip 1 Quote Share this post Link to post Share on other sites