[02 Aug 2006] Help with @BRUSH Preprocessor Command

Contains all messages from the Hollywood mailing list between 01/2006 and 08/2012
Locked
NathanH
Posts: 128
Joined: Sun Jul 05, 2015 1:29 am
Location: Caldwell, Idaho

[02 Aug 2006] Help with @BRUSH Preprocessor Command

Post by NathanH »

Note: This is an archived post that was originally sent to the Hollywood mailing list on Wed, 2 Aug 2006 22:47:34 -0600

Hi,

I've been having fun and going along pretty well loading sprites within a loop for a card game. It took 5 or 6 seconds to load a deck of cards from a .png file so I thought I'd try to load them using the preprocessor command with brushes to speed things up in the compiled version. I keep getting an error that says "Comma expected Current Line: 10" when I run this script:

Code: Select all

@display {Title="Cards", Color=#GREEN, Width=800, Height=600, Sizeable=True}
@brush  1, "56cards.png", {x= 1+ 0*72,y=1,width=72,height=96}
@brush  2, "56cards.png", {x= 2+ 1*72,y=1,width=72,height=96}
@brush  3, "56cards.png", {x= 3+ 2*72,y=1,width=72,height=96}
@brush  4, "56cards.png", {x= 4+ 3*72,y=1,width=72,height=96}
@brush  5, "56cards.png", {x= 5+ 4*72,y=1,width=72,height=96}
@brush  6, "56cards.png", {x= 6+ 5*72,y=1,width=72,height=96}
@brush  7, "56cards.png", {x= 7+ 6*72,y=1,width=72,height=96}
@brush  8, "56cards.png", {x= 8+ 7*72,y=1,width=72,height=96}
@brush  9, "56cards.png", {x= 9+ 8*72,y=1,width=72,height=96}
@brush 10, "56cards.png", {x=10+ 9*72,y=1,width=72,height=96}
@brush 11, "56cards.png", {x=11+10*72,y=1,width=72,height=96}
@brush 12, "56cards.png", {x=12+11*72,y=1,width=72,height=96}
I initially had comments in there so took them out thinking that might be the problem. I retyped without spaces when calculating the coordinates thinking that was a problem. I hard-coded the exact coordinates thinking that was the problem. I retyped all into a new file in case I somehow got a control character or something in there. Oddly enough, it always seems to error on line 10 when loading these brushes regardless of what text is on that line. Can someone please tell me what I am doing wrong? Thanks!!!!!!!!

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

[03 Aug 2006] Re: Help with @BRUSH Preprocessor Command

Post by airsoftsoftwair »

Note: This is an archived post that was originally sent to the Hollywood mailing list on Thu, 03 Aug 2006 11:55:15 +0200

Oh, you just discovered a (horrible) bug in the Hollywood parser. The evaluation of constant expressions in table arguments of preprocessor commands is really broken in 2.0. I fixed it now. Thanks for the report.

To get your code to work, use only fixed values in the preprocessor command arguments, e.g.

Code: Select all

@brush  1, "56cards.png", {x= 1,y=1,width=72,height=96}
@brush  2, "56cards.png", {x= 74,y=1,width=72,height=96}
@brush  3, "56cards.png", {x= 147,y=1,width=72,height=96}
and so on. It should work then.
NathanH
Posts: 128
Joined: Sun Jul 05, 2015 1:29 am
Location: Caldwell, Idaho

[03 Aug 2006] Re: Help with @BRUSH Preprocessor Command

Post by NathanH »

Note: This is an archived post that was originally sent to the Hollywood mailing list on Thu, 3 Aug 2006 19:45:30 -0600

Hi,

Thanks, I'll give that a try. I guess I tried it with line 10 but not all of the other lines. I appreciate your hard work in making a great product and the service you provide your users. I've worked only about 8 hours on this game and have actually been able to play it myself. I'm now trying to make it easily usable, faster, and bullet-proof for others.

I hope to not overstep my bounds but I've been keeping a list of suggestions for future versions of Hollywood to discuss with you once I'm finished if you desire additional feedback. Thanks again!

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

[04 Aug 2006] Re: Help with @BRUSH Preprocessor Command

Post by airsoftsoftwair »

Note: This is an archived post that was originally sent to the Hollywood mailing list on Fri, 04 Aug 2006 17:40:00 +0200
Hi,

Thanks, I'll give that a try. I guess I tried it with line 10 but not all of the other lines. I appreciate your hard work in making a great product and the service you provide your users. [...]
If you nail the problems down to some lines of code, I can always help you pretty fast. Everything that looks like it could be a Hollywood bug/misbehaviour should be reported to me.
I hope to not overstep my bounds but I've been keeping a list of suggestions for future versions of Hollywood to discuss with you once I'm finished if you desire additional feedback. Thanks again!
Sure, I'm always open for suggestions. Though I have enough items on my to-do list already :-)
Locked