instructions for @INCLUDE

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

instructions for @INCLUDE

Post 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.
peceha
Posts: 111
Joined: Tue Dec 13, 2016 8:39 am
Location: Poland

Re: instructions for @INCLUDE

Post by peceha »

Is your additional .HWS file saved as UTF -8 ?
If not, try doing so.
Bugala
Posts: 1178
Joined: Sun Feb 14, 2010 7:11 pm

Re: instructions for @INCLUDE

Post 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.
Bugala
Posts: 1178
Joined: Sun Feb 14, 2010 7:11 pm

Re: instructions for @INCLUDE

Post 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.
peceha
Posts: 111
Joined: Tue Dec 13, 2016 8:39 am
Location: Poland

Re: instructions for @INCLUDE

Post 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!
Bugala
Posts: 1178
Joined: Sun Feb 14, 2010 7:11 pm

Re: instructions for @INCLUDE

Post 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.
peceha
Posts: 111
Joined: Tue Dec 13, 2016 8:39 am
Location: Poland

Re: instructions for @INCLUDE

Post by peceha »

I'm using Hollywod IDE under Windows 8
Bugala
Posts: 1178
Joined: Sun Feb 14, 2010 7:11 pm

Re: instructions for @INCLUDE

Post by Bugala »

Then this might be Windows 10 bug, or some specific bug on my machine.
User avatar
airsoftsoftwair
Posts: 5433
Joined: Fri Feb 12, 2010 2:33 pm
Location: Germany
Contact:

Re: instructions for @INCLUDE

Post by airsoftsoftwair »

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

Re: instructions for @INCLUDE

Post 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.
Post Reply