Blitz Refuses to read variables

Blitz3D Forums/Blitz3D Beginners Area/Blitz Refuses to read variables

Crinkle(Posted 2008) [#1]
Hi there i think my blitz has gone very wrong! I am trying to get it to read a table exported in csv from excell, but its not reading one of the columns, fo no obvious reason! Any help is appreciated:

Just downlaod the two files below, and run in blitz:

http://slcrinkle.googlepages.com/DVDX.csv
http://slcrinkle.googlepages.com/DVD_table.bb

If anyone knows why this is happening let me know! Otherwise i'll have to email blitz and tell them theres a bug in the thing!


Stevie G(Posted 2008) [#2]
Your not parsing the file correctly. Using your existing code with a few tweaks - this works. Tip: debuglog pinpointed the problem almost imediately.

	While var<7

		word$=""
		letter$=""
		While letter$<>"," And pos <=Len( temptext$ )
			word$=word+letter$
			letter$=Mid$(temptext$,pos,1)
			pos=pos+1
			DebugLog "Var: "+var+ "  pos: "+pos+" letter: "+letter + "  word: "+word
		Wend
		
		If Right(word$,1)="," Then word=Left$(word$,Len(word)-1) ; if the comma gets through, kill it
		
		DVDDB(DVDNUMBER,var)=word$
		update_db()
		var=var+1
	Wend