[Gambas-user] IDE CR/LF bug with improperly indented comment line after If...Then...Else...Endif
Kevin Fishburne
kevinfishburne at ...1887...
Thu Dec 11 08:54:32 CET 2014
If you have an If...Then...Else...Endif block where there is an
improperly indented comment line after the initial If, pressing Enter at
the end of the If line will mistakenly insert and Endifbelow it.Example:
' Check if ship is player ship.
If Ship[ShipIndex].Type = 0 Then
' Play player ship firing sound effect.
AudioCreate("laser_3.wav", Bullet[BulletIndex].PositionX,
Bullet[BulletIndex].PositionY, Bullet[BulletIndex].PositionZ, 0.15, 0, 0)
Else
' Play NPC ship firing sound effect.
AudioCreate("laser_2.wav", Bullet[BulletIndex].PositionX,
Bullet[BulletIndex].PositionY, Bullet[BulletIndex].PositionZ, 0.5, 0, 0)
Endif
Becomes this when pressing Enter after the initial "Then":
' Check if ship is player ship.
If Ship[ShipIndex].Type = 0 Then
Endif
' Play player ship firing sound effect.
AudioCreate("laser_3.wav", Bullet[BulletIndex].PositionX,
Bullet[BulletIndex].PositionY, Bullet[BulletIndex].PositionZ, 0.15, 0, 0)
Else
' Play NPC ship firing sound effect.
AudioCreate("laser_2.wav", Bullet[BulletIndex].PositionX,
Bullet[BulletIndex].PositionY, Bullet[BulletIndex].PositionZ, 0.5, 0, 0)
Endif
Minor issue, but every time a bug dies an angel gets its wings.
--
Kevin Fishburne
Eight Virtues
www: http://sales.eightvirtues.com
e-mail: sales at ...1887...
phone: (770) 853-6271
More information about the User
mailing list