Author Topic: For the Pro's! All DATA RESTORE not working anymore  (Read 7505 times)

0 Members and 1 Guest are viewing this topic.

Offline Pete

  • Forum Resident
  • Posts: 2361
  • Cuz I sez so, varmint!
    • View Profile
Re: For the Pro's! All DATA RESTORE not working anymore
« Reply #15 on: December 06, 2018, 11:51:23 am »
Cobalt beat me to it.

@Fell, I always make it a rule to place data statements with labels at the end of main, before the first sub/function. I think that's a good programming practice. Nice to see that's already in the WIKI. Now I'm wondering if it was made that way by Rob to be QBasic compatible? I don't have access to my old computer with QB on it now, so I can't check. It seems if it was not to maintain compatibility, it might be a good idea to disallow non-label data placed after sub/functions, too.

@xra7en No worries, it happens to all of us from time to time... To many trees to see the forest.

Pete
Want to learn how to write code on cave walls? https://www.tapatalk.com/groups/qbasic/qbasic-f1/

Offline xra7en

  • Seasoned Forum Regular
  • Posts: 284
    • View Profile
Re: For the Pro's! All DATA RESTORE not working anymore
« Reply #16 on: December 06, 2018, 12:04:45 pm »
you have a sub in your first include file, right there is your error,
if you have a include file that is a sub place it at the bottom of the program.

'$include: 'lordwrite.bas'   <----- guy right here is a SUB!!!
'$include: 'moblist.bi'
'$include: 'equipment.bi'

just as Fellippe has been saying.

Kinda neat that you want to  remake LORD though, i've thought about it a few times.. I love remaking or cloning old games.
can't wait to see how this turns out.

THHAAAAAAAAAAT was it. "gawd" /facepalm

maybe i should turn my flowchart rightside up :P

Thanks = works!, now I am back to my original bug hahaha - but thats normal. programming is not fun w/o bugs
I just like re-writing old DOS book games into modern QB64 code - weird hobby, I know!