[FIXED 0.78.0] Comment Bugs

Post any Bug Reports here
Post Reply
Juryiel
Posts: 103
Joined: Fri Jan 04, 2008 1:18 pm

[FIXED 0.78.0] Comment Bugs

Post by Juryiel » Tue Jan 08, 2008 9:50 am

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
Last edited by Juryiel on Sun Jan 13, 2008 2:52 am, edited 2 times in total.

User avatar
vrageprogrammer
Posts: 566
Joined: Wed Oct 31, 2007 2:59 pm
Location: On top of a tree
Contact:

Post by vrageprogrammer » Tue Jan 08, 2008 12:11 pm

Also, using comments in the begining can cause ur script to not work
It was not Possible to determine the dimensions of the image....

Juryiel
Posts: 103
Joined: Fri Jan 04, 2008 1:18 pm

Post by Juryiel » Sun Jan 13, 2008 2:51 am

Update! See first post under NEW section :)

Jay
RF Dev Team
Posts: 1232
Joined: Fri Jul 08, 2005 1:56 pm
Location: Germany

Post by Jay » Sun Jan 13, 2008 11:30 am

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.
Everyone can see the difficult, but only the wise can see the simple.
-----

User avatar
Graywolf
Posts: 75
Joined: Mon Apr 14, 2008 8:36 pm
Location: Anchorage, Alaska
Contact:

Re: [WON'T FIX] Comment Bugs

Post by Graywolf » Wed Jul 30, 2008 2:12 pm

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.
"So, what's the life of a programmer like?" "...Huh? What life?!"

RF System X:
http://www.realityfactory.info/forum/vi ... f=9&t=3599

User avatar
QuestOfDreams
Site Admin
Posts: 1520
Joined: Sun Jul 03, 2005 11:12 pm
Location: Austria
Contact:

Re: [FIXED 0.77.0] Comment Bugs

Post by QuestOfDreams » Sat Nov 14, 2009 12:11 pm

Revisited and fixed ...

Post Reply