Really weird stuff going on

BlitzMax Forums/BlitzMax Beginners Area/Really weird stuff going on

The forum is locked. These are the original blitzbasic.com forums, kept so they can still be read. No new topics, replies or edits can be made here. To join in, head over to the Blitz3D+ forums.

Never mind, I've found the problem already.

	' Remove spaces at the end of the name
	While Chr(a.Name$[a.Name$.length - 1]) = Chr(32)
		a.Name$ = a.Name$[..(a.Name$.length - 1)]
	Wend


I was cutting off one character too much.
I thought the While..Wend loop did it's job good, as no other names had the problem.
It only worked with names that have a length that was even.

Just a math problem here actually (zero-based strings instead of one-based).