"Type given but not used to declare anything" ash error

DittoxD

New member
Hey folks,

So I'm getting a weird error with this WIP code at verify time.

"Type given but not used to declare anything (thingy.ash, line 265)"

Except that this is just a normal map lookup + assignment, so what does ash think I'm trying to declare? Commenting out the line in question lets the script pass verify. Has anyone seen this before or know what I'm doing wrong?

Thanks~
 

heeheehee

Developer
Staff member
I think (not totally sure) that the problem is that you've declared Board to be a record. Note that ASH isn't case-sensitive for the most part. The parser finds board at the beginning of a line, thinks that's a type name, then gets confused when it doesn't see a new variable name.

Simple fix for now is to just change the variable name to, say, b.
 

DittoxD

New member
The case-sensitive part would make sense, and indeed, changing the variable name seemed to fix it.

I'm using board in plenty of other places, but this was the only place where it actually appeared at the very beginning of a statement, which is certainly ambiguous from the parser's standpoint. I guess it just assumes type-name in these cases.

Thanks!
 
Top