Jump to content
IGNORED

Action! Include and Error 8...


Mikeee76

Recommended Posts

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 ?

 

 

 


Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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 by Mikeee76
Link to comment
Share on other sites

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.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...