instructions for @INCLUDE

Find quick help here to get you started with Hollywood
Bugala
Posts: 760
Joined: Sun Feb 14, 2010 7:11 pm

instructions for @INCLUDE

Post by Bugala » Wed Aug 16, 2017 5:43 pm

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.

peceha
Posts: 111
Joined: Tue Dec 13, 2016 8:39 am
Location: Poland

Re: instructions for @INCLUDE

Post by peceha » Wed Aug 16, 2017 6:28 pm

Is your additional .HWS file saved as UTF -8 ?
If not, try doing so.

Bugala
Posts: 760
Joined: Sun Feb 14, 2010 7:11 pm

Re: instructions for @INCLUDE

Post by Bugala » Wed Aug 16, 2017 6:58 pm

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.

Bugala
Posts: 760
Joined: Sun Feb 14, 2010 7:11 pm

Re: instructions for @INCLUDE

Post by Bugala » Wed Aug 16, 2017 7:01 pm

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.

peceha
Posts: 111
Joined: Tue Dec 13, 2016 8:39 am
Location: Poland

Re: instructions for @INCLUDE

Post by peceha » Wed Aug 16, 2017 7:32 pm

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!

Bugala
Posts: 760
Joined: Sun Feb 14, 2010 7:11 pm

Re: instructions for @INCLUDE

Post by Bugala » Wed Aug 16, 2017 7:36 pm

Are you using Windows IDE and Windows 10?

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

peceha
Posts: 111
Joined: Tue Dec 13, 2016 8:39 am
Location: Poland

Re: instructions for @INCLUDE

Post by peceha » Wed Aug 16, 2017 7:38 pm

I'm using Hollywod IDE under Windows 8

Bugala
Posts: 760
Joined: Sun Feb 14, 2010 7:11 pm

Re: instructions for @INCLUDE

Post by Bugala » Wed Aug 16, 2017 8:58 pm

Then this might be Windows 10 bug, or some specific bug on my machine.

User avatar
airsoftsoftwair
Posts: 3040
Joined: Fri Feb 12, 2010 2:33 pm
Location: Germany
Contact:

Re: instructions for @INCLUDE

Post by airsoftsoftwair » Sat Aug 19, 2017 12:13 pm


Bugala
Posts: 760
Joined: Sun Feb 14, 2010 7:11 pm

Re: instructions for @INCLUDE

Post by Bugala » Sat Aug 19, 2017 12:57 pm

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.

Post Reply