Page 1 of 2

instructions for @INCLUDE

Posted: Wed Aug 16, 2017 5:43 pm
by Bugala
I am having trouble using @INCLUDE, I dont know what I am doing wrong.

I Included one .hws file, and it shows in Hollywood execution that it was succesfully opened. However, it gives me error, right at line number 1 on that code. Line number 1 is following:

Code: Select all

prototype_cardspace = { x=0, y=0, w=200, h=200, xspace=100, yspace=100, cardsinrow=15, dir="x", zoom=200, cards={}, owner=0 }
Error it gives me is "unexpected symbol in line 1"

Even if i copy-paste this line to main file, it still gives me the same "unexpected symbol in line 1" error from the included file.

What is this unexpected symbol in line 1 that I am having, I have no clue?

And to add to this, i copy pasted all this code from the main file originally, and it was working fine. Also, if i open this include file alone and run it, it works fine. It only gives me trouble when i try to include it to the main file.

Re: instructions for @INCLUDE

Posted: Wed Aug 16, 2017 6:28 pm
by peceha
Is your additional .HWS file saved as UTF -8 ?
If not, try doing so.

Re: instructions for @INCLUDE

Posted: Wed Aug 16, 2017 6:58 pm
by Bugala
I originally saved it using Hollywood IDE, so either it is in right format, or there is bug in Windows IDE.

I however did after your suggestion open it using notepad and saved it as UTF-8, but still same problem.

Re: instructions for @INCLUDE

Posted: Wed Aug 16, 2017 7:01 pm
by Bugala
Additional info.

I now made a new program, which contains only one line:

Code: Select all

@INCLUDE "prototype_cardspace.hws"
and then i reduced that include file to contain only one line:

Code: Select all

prototype_cardspace = { x=0, y=0, w=200, h=200, xspace=100, yspace=100, cardsinrow=15, dir="x", zoom=200, cards={}, owner=0 }
And it is not working, but tells me the same error message as before.

Re: instructions for @INCLUDE

Posted: Wed Aug 16, 2017 7:32 pm
by peceha
Well, I just did copy-paste from your messages and now I have 2 files - one with @INCLUDE and the other with table declaration .... and it is working - I mean, compiler doesn't throw any error, only says:
Opening script prototype.hws...done
Compiling script...
Including file prototype_cardspace.hws...done
Preparing display...done
And Action!

Re: instructions for @INCLUDE

Posted: Wed Aug 16, 2017 7:36 pm
by Bugala
Are you using Windows IDE and Windows 10?

I guess this is some sort of bug then. I just wonder what is causing it.

Re: instructions for @INCLUDE

Posted: Wed Aug 16, 2017 7:38 pm
by peceha
I'm using Hollywod IDE under Windows 8

Re: instructions for @INCLUDE

Posted: Wed Aug 16, 2017 8:58 pm
by Bugala
Then this might be Windows 10 bug, or some specific bug on my machine.

Re: instructions for @INCLUDE

Posted: Sat Aug 19, 2017 12:13 pm
by airsoftsoftwair

Re: instructions for @INCLUDE

Posted: Sat Aug 19, 2017 12:57 pm
by Bugala
Ah, okay. Thanks for pointing to the fix.

Slightly annoyingly it affects files saved in Hollywood IDE, so have to use notepad to save them right way when wanting to @INCLUDE them.