Deleted
Deleted Member
Posts: 0
|
Post by Deleted on Jun 7, 2011 6:20:30 GMT -5
Quoted from the BEX documentation.
Command_INCLUDE: Syntax: Include <File Name> Description: Includes another BASIC source code into the source code. Includes cannot be nested, and this command is still very buggy, and will be buggy for a long time.
|
|
Deleted
Deleted Member
Posts: 0
|
Post by Deleted on Jun 7, 2011 14:10:35 GMT -5
Quoted from the BEX documentation. Command_INCLUDE: Syntax: Include <File Name> Description: Includes another BASIC source code into the source code. Includes cannot be nested, and this command is still very buggy, and will be buggy for a long time. I hope I didn't offend moon. Buggy != Not work at all. Thus a bug report is in order. If you have more to contribute than what we all have read from the documentation please do so. Despite my lack of skills I've been rereading the command reference almost every lunch break for weeks. If you can think of a situation where this command has worked or know of a workaround let me know. Again, you usually have more to contribute when answering a question so I must have offended you. Sorry about that man.
|
|
Deleted
Deleted Member
Posts: 0
|
Post by Deleted on Jun 7, 2011 14:30:49 GMT -5
I know in the kramlib example, kram put in:
endoffile: include path\to\library\file.lib
or something of that nature. I can double check when I get home, but it works as it *should* in his example.
|
|
Deleted
Deleted Member
Posts: 0
|
Post by Deleted on Jun 7, 2011 14:34:28 GMT -5
No worries, simply posted it in case you hadn't read it. Personally, when something is described as very buggy ( don't forget the very ) , I stay clear of it and use whatever is the best alternative. So .. can't help you on the "include" command, never used it
|
|
oompa loompa
I AM THE GOVERNATOR
"Git 'Er Dun!"
Posts: 1,301
|
Post by oompa loompa on Jun 7, 2011 15:39:18 GMT -5
Quoted from the BEX documentation. Command_INCLUDE: Syntax: Include <File Name> Description: Includes another BASIC source code into the source code. Includes cannot be nested, and this command is still very buggy, and will be buggy for a long time. Ditto on the documentation . This must have been 6 years ago I don't remember why it's buggy, but I do remember that the implementation is very buggy. Very very buggy. Like it will only work 50% of the time. I think what the include command does is that it reads the entire file, and then inserts everything into your current source code. Sorry for the quick hack ^_^ About the file searching, I will look into that. Because I remember that at least that use to work before
|
|
Deleted
Deleted Member
Posts: 0
|
Post by Deleted on Jun 7, 2011 16:09:11 GMT -5
This is how Kram did it with his Kramlib example: And it works fine. I would assume if you're going to include BEX code, then you'll want to add it in the end of the code using a line label like ExternalLibrary: first, and minus the ASM code block. Then again, that just might be the ASM version working and not the BEX command.... oh well, I tried
|
|
Deleted
Deleted Member
Posts: 0
|
Post by Deleted on Jun 17, 2011 3:58:02 GMT -5
This is how Kram did it with his Kramlib example: And it works fine. I would assume if you're going to include BEX code, then you'll want to add it in the end of the code using a line label like ExternalLibrary: first, and minus the ASM code block. Then again, that just might be the ASM version working and not the BEX command.... oh well, I tried See, that's the weird thing! INCLUDE was supposed to be for BASIC libraries not assembly. According to the docs LIBRARY is the command to include assembly files and INCLUDE is the one for BEX files.. The guy who was developing Kramlib was using INCLUDE successfully as what the LIBRARY command should be doing! Even when I put my BASIC library in the slibrary folder and rename it boner.s BasiEgzXorz IDE gives a Run-time error '52': bad file name or number and exits *without* saving work in progress
|
|
Deleted
Deleted Member
Posts: 0
|
Post by Deleted on Aug 22, 2011 2:09:24 GMT -5
This breaks syntax checking:
DECLARE SUB DRAWBLOCK(dbn as integer, dbx as integer, dby as integer) IF dbx > 32 then EXIT SUB ' DRAWTILE lets you corrupt memory by drawing beyond tile buffer IF dby > 32 then EXIT SUB ' Exit the routine if requested x/y is out of collision map collision_map(dbx,dby) = dbn ' Register block in collision map dbx = dbx*2 ' Convert x/y into actual tile coordinates dby = dby*2 DRAWTILE dbn,dbx,dby : DRAWTILE dbn,dbx+1,dby DRAWTILE dbn,dbx,dby+1 : DRAWTILE dbn,dbx+1,dby+1 END SUB
This does not:
DECLARE SUB DRAWBLOCK(dbn as integer, dbx as integer, dby as integer) ' DRAWTILE lets you corrupt memory by drawing beyond tile buffer ' Exit the routine if requested x/y is out of collision map IF dbx > 32 then EXIT SUB IF dby > 32 then EXIT SUB collision_map(dbx,dby) = dbn ' Register block in collision map dbx = dbx*2 ' Convert x/y into actual tile coordinates dby = dby*2 DRAWTILE dbn,dbx,dby : DRAWTILE dbn,dbx+1,dby DRAWTILE dbn,dbx,dby+1 : DRAWTILE dbn,dbx+1,dby+1 END SUB
I doubt if this'll get fixed but I posted as a heads up for other BEX developers. Try and keep comments on their own line especially in sub-routines.
|
|
|
Post by memorydump on Jan 2, 2012 23:27:15 GMT -5
Dunno if this was mentioned already, or if this program will ever be updated again and my bug will be seen, but it seems like adding comments is broken at random. Specifically if you do 'if , it will register the "if" as though it's a real command, despite the ' making it a comment.
I get the same error that there's an if... then statement without an endif, even though all I did was add a comment next to my code.
|
|
Deleted
Deleted Member
Posts: 0
|
Post by Deleted on Jan 3, 2012 10:32:26 GMT -5
memorydumpIn case you really want a comment in the same line as a if statement, you can dodge the compiler error by closing the if statement properly. For example .. if 1 then palette rgb(0,3,7),0,0: endif 'This does work!
|
|
|
Post by nunzio722 on Mar 4, 2012 15:57:29 GMT -5
Not sure if it goes here but, when i try to load .txt tiles into sgtd, it tells me that it has runtime error 9, i have no idea what could be wrong, please help!
|
|
|
Post by Mairtrus on Mar 5, 2012 7:46:10 GMT -5
Not sure if it goes here but, when i try to load .txt tiles into sgtd, it tells me that it has runtime error 9, i have no idea what could be wrong, please help! What sgtd's version are you using? Because the v0.46 gave me that error a lot of times. If you have the v0.51 beta, try opening the txt file in Notepad, and change the values in TileSelect and TileScroll by 0.
|
|
|
Post by nunzio722 on Mar 5, 2012 14:20:45 GMT -5
nevermind, got it working just needed to use different version.
|
|
|
Post by mkg on Dec 3, 2013 12:44:53 GMT -5
there's a glitch that makes readtiles cant be used in functions when i put readtiles on a function, later when using that function, for drawing tiles or printing, the screen will come blank or have corrupted gharpics
|
|
|
Post by mkg on Dec 3, 2013 12:48:31 GMT -5
fake command dosent work, asmx errors:
Output File: basic.bin Pass 1 Pass 2 basicdat.s:2: *** Error: Phase error *** = FF004C __LABEL_mydata EQU __INTEGER_a basicdat.s:3: *** Error: Phase error *** = FF004C __DATA_Pmydata EQU __INTEGER_a
00002 Total Error(s)
UnSuccessfully Compiled :( ! 2 Asmx errors Have a nice day
Press ESC to close the log window
|
|