|
Post by alovon on Jan 26, 2010 21:42:21 GMT -5
Ok haha so I ran smack into another problem. I really can't actually figure theis one out. In my oppinion it should work but I need you to let me know what is up... here is the link to all the code so you dont have to make any directories or whatnot. www.mediafire.com/?dnoiz2inmomI think I did it all right. Just in the subroutines section this little loop in the Build level is killing me. While CheckCell$<>" " CheckCell$=Mid$(Temp$,CheckCellX,1) Cell$=Cell$+CheckCell$ CheckCellX=CheckCellX+1 Wend It is supposed to add to the Cell$ character but the loop... Well erm it loops indefinately. I know this is probably a simple fix but I am so flipping lost I have no idea where to begin to fix it. Thanks in advance for any help! Alovon [EDIT] Oops sorry about the file mishap. I accidentialy placed the wrong file in the URL. My bad. Link fixed now.
|
|
|
Post by shadow008 on Jan 28, 2010 10:08:43 GMT -5
i think its probably this: you have: While CheckCell$<>" " it should be While CheckCell$<>"" *notice the "no space" in the quotation marks* im pretty sure thats ur problem
|
|
|
Post by alovon on Jan 30, 2010 22:22:08 GMT -5
Actually that is the problem. But the reason I have it that way is because as it reads a file it scans for spaces. the spaces indicate a new cell. I haven't had access to a pc in a while so I haven't played with it. (Im using my phone) I'm going to try changing the spaces to commas. I just don't understand why the mid$ command does not work specificaly(sp) in this instance. It doesnt return any value at all. I don't get it.
|
|
|
Post by Nicky Peter Hollyoake on Jan 31, 2010 23:09:19 GMT -5
After looking at how your levels, I do think it can be loaded easier. Heres your data. 10 10 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 Lets load the level like this instead: dim file = openfileread("File name") dim width = val(readtext(file, true)) dim height = val(readtext(file, true)) dim currentmusic = val(readtext(file, true)) dim x, y dim m(width-1)(height-1)
for y = 0 to height-1 for x = 0 to width-1 m(x,y)=val(readtext(file, true)) next next Just a thought (tell me, I might be wrong). - Nicky
|
|
|
Post by Darkjester on Feb 11, 2010 23:36:09 GMT -5
That looks about right nicky, all he should need to do is check for certain numbers in the array he stores the map numbers in -darkjester
|
|