Mikeee76 Posted December 24, 2018 Share Posted December 24, 2018 Hi, after many, many years I'm coming back to Action! and I ran into a problem... I have two ACT files :first one is called "MAIN.ACT" and the second one: "DATA.ACT" The "DATA.ACT" contains only one small array, nothing more. I'm trying to include this small "DATA.ACT" into the MAIN.ACT. File DATA.ACT looks as follows: BYTE ARRAY MAP=[ 55 55 56 57 58 59 58 57 56 55 56 56 57 55 ] MODULE and the MAIN.ACT: INCLUDE "H:DATA.ACT" CARD CH, DL PROC SETUP() GRAPHICS(0) DL=PEEKC(88) ZERO(DL,959) ;Clear the screen MOVEBLOCK(DL,MAP,13) ;put the data to the screen ;............ The code is of course a bit reduced here, but it's enough to describe where the problem is... My problem:I'm getting an Error 8 in line:MOVEBLOCK(DL, MAP, 13) pointing at "MAP" as "variable not declared"If I put the array "MAP" directly into the "MAIN.ACT" everything works ok, but I want to have it outside in an external ACT file.How can I include an external array without getting an Error 8 ? Quote Link to comment Share on other sites More sharing options...
Alfred Posted December 24, 2018 Share Posted December 24, 2018 It's an interesting bug. I don't get an error 8, but MAP does not get initialized properly, just has whatever the underlying ram contained. I don't see any obvious error in the include code in the cartridge. At first I thought it had to do with H: but that's not it. Still looking into it. Quote Link to comment Share on other sites More sharing options...
Alfred Posted December 24, 2018 Share Posted December 24, 2018 Ok, I made a mistake. So there's no bug in INCLUDE. If I reproduce your segment above it works. Oddly though, map becomes a buffered array, rather than inline, not sure what that's about. Anyway, no error 8, so there must be something else going on in your code. We'll need to see more. Quote Link to comment Share on other sites More sharing options...
Mikeee76 Posted December 25, 2018 Author Share Posted December 25, 2018 (edited) ok, problem solved!it's was the data.act file. I edited it and saved it meantime under Windows and forgot about it,Action! apparently could read the file but just as a "plain text" (include itself worked, no warnings )but the compiler didn't get it "as a code" and therefore was the "map" array still undeclared... Edited December 25, 2018 by Mikeee76 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.