Page 1 of 1

[FIXED 0.78.0] Comment Bugs

Posted: Tue Jan 08, 2008 9:50 am
by Juryiel
I'm beginning to find a few comment bugs as I code (I comment extensively because I am known to forget my own logic within 5 minutes). Clealry these are not of high importance to fix, but at least documenting them might be useful.

Although they may appear as multiple lines in the forum, they are indeed all on one line, and come after the //
I'll keep a list updated here, hopefully not too many:
UPDATE: 01/12/2008

NEW

1. When using an array such as this:

Code: Select all

ITEM0_ARRAY
{
	ITEM0_ARRAY0 ["Berry"]
	ITEM0_ARRAY1 [20]
	ITEM0_ARRAY2 [100]
	ITEM0_ARRAY3 ["Freshly picked Berry.  Restores 100 Hit Points."]
}
if you have comments next to the array entries, the array order gets broken. For example, if I put //Name next to ITEM0_ARRAY0["Berry"], then ITEM0_ARRAY1 [20] is now referenced by ITEM0_ARRAY[2] instead of ITEM0_ARRAY[1] as it should be. I also found that I could not reference some of the entries at all when I put comments on each line, but it may have been that the index had been pushed up so far that I hadn't checked (only checked up to about 6 or so).

OLD

2. Including commas in comments cause scripts to break - Only true for comments that are not in any orders
3. Including apostrphes in comments cause scripts to break - Only true for comments that are not in any orders

Posted: Tue Jan 08, 2008 12:11 pm
by vrageprogrammer
Also, using comments in the begining can cause ur script to not work

Posted: Sun Jan 13, 2008 2:51 am
by Juryiel
Update! See first post under NEW section :)

Posted: Sun Jan 13, 2008 11:30 am
by Jay
cool, thanks! I did not know this comment error with the arrays, and i always wondered why some arrays did not work in the way they should.

Re: [WON'T FIX] Comment Bugs

Posted: Wed Jul 30, 2008 2:12 pm
by Graywolf
A little insight into this...


Original script section:

Code: Select all

	LOSTTIME		[15]		// time to search for enemy before giving up
	POINTRADIUS		[20]		// radius from point when considered there
And, a dump of the script, post-parse:

Code: Select all

	LOSTTIME [15] 
	//
	time
	to
	search
	for
	enemy
	before
	giving
	up
	POINTRADIUS [20] 
	//
	radius
	from
	point
	when
	considered
	there
The parser is "forgetting" to ignore the whitespace up to the next line end, like it should be. I'm pretty sure I can fix this.

Re: [FIXED 0.77.0] Comment Bugs

Posted: Sat Nov 14, 2009 12:11 pm
by QuestOfDreams
Revisited and fixed ...