It's because you've moved some stuff out of your loop. The line where you update B and the line where you print the player should be inside your loop, like in your first screenshot, or else they'll only be run once.
Also, note that ENDIF is only necessary if you split your IF into separate lines.
This doesn't need ENDIF:
IF condition THEN code
This does:
IF condition THEN
code
ENDIF
0そうだね 未プレイ