Some Errors I've Found

Login to reply  Page: « < 1 of 1 > »
20 Jun 2010 - 04:252748
Some Errors I've Found
So far, these are the errors in the area files I've noticed.

http://www.cs.binghamton.edu/~sgreene/tba_spelling.sgreene.patch001.txt

As was clarified, I've only included spelling issues which I believe are wrong on both sides of the pond.

Also, there are two things I think might be actual errors, but am not 100% sure, so I did not include them in this first patch:

1) shp/316.shp line 9: This '55' seems wrong. Is that an item type I'm not aware of, or a typo?

2) wld/314.wld lines 290-292. I believe these use a different color escape syntax than everything else (/cw and /c0) - do these need to be updated/removed?

Anyway, hope that helps somebody. I'll post more as I find them (unless I get bad feedback for this set, that is).


20 Jun 2010 - 15:442753
Thanks, and let me know what else you find. One trick I've learned is to grep for common misspelled words and then use sed to replace them all. For instance foliage was misspelled as foilage 17 times on TBA (TBA has many more zones than we actually release).

grep -in foilage *.wld
sed -i "s/foilage/foliage/g" *.wld
Just be careful using sed, and have a good backup.


__________________
Rumble
The Builder Academy
tbamud.com 9091
20 Jun 2010 - 16:012754
Yep, that's exactly what I did (well, with a little perl and svn magic to help me out). I'd just see something which irked me, and grep for all its friends.

Of course, most of my local "corrections" are actually en/us variants (armour, colour, sceptre, etc...). So, I'll keep them separate and just report the others.

...another set of potential issues to come in a few minutes (in another thread).


20 Jun 2010 - 16:122755
Only one I didn't change in 314.wld line 45. consummation should be consumption.

That shop file is fine that number 55 is used to indicate buy types:
Buys: NO_DROP (#55) [all]

And you are right, the other was from old color codes.

Thanks again, and keep them coming.


__________________
Rumble
The Builder Academy
tbamud.com 9091
20 Jun 2010 - 16:482757
Re: that "55"
Ahh, ok. That makes sense.

I believe, then, that the docs need to be updated. They refer the builder to the list of "Type Flag"s in the object spec, which only seems to detail #1-23.

...that is, of course, assuming I haven't missed something in the docs, or newer versions of the docs than were distributed with the tarball/svn checkout.


20 Jun 2010 - 17:472758
It doesn't record the number listed in the help files or doc but instead stores a number which represents that value.


__________________
Rumble
The Builder Academy
tbamud.com 9091
21 Jun 2010 - 17:142762
A few more I've found:

http://www.cs.binghamton.edu/~sgreene/tba_spelling.sgreene.patch002.txt

I don't know if you'd rather I send these in small chunks or queue them up in one big one, so I'm going with choice 1 for now (to make the small chunks easier to review).

I also don't know if you'd rather I start a new thread for each one of these, or use the same thread for similar kinds of issues, so I'm going with choice 2 for now.


As for the shop item type number confusion, I guess I'll read the source to try to see what's happening there. Thanks.


22 Jun 2010 - 19:442765
In addition, trigger #20110 seems to have been corrupted somehow. The comments at the beginning don't make sense ("in this file are not changed", "so you..."), and I don't believe "crab sleep" is valid trigger code (or is it?).


23 Jun 2010 - 17:142771
Thanks for more corrections. Added for next release and please keep them coming.

You are right, that trig did get messed up somehow. The solution was just deleting the first 3 lines.


__________________
Rumble
The Builder Academy
tbamud.com 9091

Last edited by Rumble (23 Jun 2010 - 17:15)
04 Jul 2010 - 03:112802
More Probable Trigger Errors?
In a number of places, there are unterminated variables in triggers (% with no trailing %) or actual percent signs which have not been doubled (%%). I gather the parser doesn't mind these, and just terminates on white-space anyway. However, looking at all of these cases, you can see some are actual errors (line-wrap at trg/12.trg:448, for example), so it might be worthwhile to clean these all up anyway. This should make fixing those that ARE errors easier, and allow these kinds of errors to be easier to see/fix in the future.

Rather than give you a full list of lines (since there might be similar errors in trigger files I don't have anyway), this is a simplified version of the command I used to look through all of them:

grep -nE '^[^%]*(%[^%]*%[^%]*)*[^%]*%[^%]*$' trg/*

I removed the parts that eliminate comments (start with white-space+*) and name lines (end with ~) for simplicity, since the vast majority of the matches aren't either of those anyway. Basically, it just says "show all lines which have an odd number of '%'s.

Of course, as always, I could just be missing something.

Hope that helps.

PS: I have found more errors, but it's harder and harder to separate the ones I've reported from the ones I haven't. There isn't any chance I could convince you to keep the world files on SVN current, or otherwise give me (even just read-only) access to them, is there? Otherwise, I will probably wait for the next release/SVN update to report most of them.


04 Jul 2010 - 03:482803
Water, Water, Anywhere?
Also, another thing I noticed with the tba world files. It seems almost none of the water rooms are actually wet. For example, the midgaard river by the levee is actually a path now. I assume this is not intentional, and that the sector type was somehow lost in these. Checking through all the files, the only ones which still seem to have water are the whirlpool rooms in sector 556 - and none are "flying" or "mountain", either.

I confirmed this with:

grep -nE '^[0-9]+ [0-9]+ [0-9]+ [0-9]+ [0-9]+ [5-9]$' wld/*

I also confirmed this with a vanilla tba install, and, sure enough, you can just walk out onto the midgaard river.

Am i just missing something here?


04 Jul 2010 - 18:552806
Some More Typos
Here is my latest diff of typos/errors:

http://www.cs.binghamton.edu/~sgreene/tba_spelling.sgreene.patch003.txt

I have included a couple which I am not 100% sure of, just for ease on my end:
1) trg/27.trg: I am really not sure this was wrong, nor that my corrections are right here.
2) trg/19.trg: I am sure this is an error, but not 100% sure my correction is right.

The rest, I believe, are pretty straight-forward (though one does overlap with a previous post).

PS. I am assuming that I am still posting all of these in the right place, and that you will get to these three posts whenever you have time, which is fine (this is not a complaint, nor any form of (non)subtle prodding). If I should be starting a new thread for each issue, or otherwise getting you this info in a different way, please just let me know.


05 Jul 2010 - 16:352808
Great thanks, this is fine. I will add the World files to SVN and check the typos. Though it might be a while since the in-laws are visiting. And thanks for being tact about pointing out mistakes in the TBA codebase but don't feel like you need to, constructive criticism is always welcome.


__________________
Rumble
The Builder Academy
tbamud.com 9091
06 Jul 2010 - 05:142809
Nice catch by checking for odd number of %. It did catch a lot of typos. All your corrections looked good. World files were added to the SVN to make future updates easier. Thanks again for all the help.


__________________
Rumble
The Builder Academy
tbamud.com 9091
06 Jul 2010 - 21:392810
Thanks
Great, this will let me sync my world files with yours, and make it easier to send you updates/corrections/fixes as I see them.

Here is one more. It's not an error, nor really a correction, just a suggestion. In my parser, if an invalid script line is hit, the script terminates, so I need this code. Since the "play" command doesn't exist (at least, not in my code base) without the flute or trombone to provide it, this causes this script to error out for Data. It also causes Riker and Picard to call the flute/trombone script twice each time, when that's not really necessary. So, in TBA itself, I believe it's only an optimization to reduce extra script calls.

Index: lib/world/trg/241.trg
===================================================================
--- lib/world/trg/241.trg	(revision 223)
+++ lib/world/trg/241.trg	(working copy)
@@ -591,8 +591,11 @@
   eval number %random.20%
   switch %number%
     case 1
-      play flute
-      play trombone
+      if %self.vnum% == 24106 && %actor.inventory(24111)%
+        play flute
+      elseif if %self.vnum% == 24105 && %actor.inventory(24112)%
+        play trombone
+      end
     break
     default
     break



Last edited by Insomnia (06 Jul 2010 - 23:08) Reason: Updated patch to be -vs- TBA's current SVN.
06 Jul 2010 - 23:012811
Next Set of Probable Trigger Typos.
Based on current (v223) subversion, it looks like you got almost all the %-pair typos I found, and a bunch I didn't. A few still remain, if I'm understanding the syntax right (certainly not a given). Here is a patch based on current SVN to correct those last (I hope) ones:

http://www.cs.binghamton.edu/~sgreene/tba_typos.sgreene.patch004.txt

The only one that still sets off my grep is this one:

trg/12.trg:984:%send% %actor% sending stuff that might %corr%upt%.

...which I presume is supposed to be wrong, so therefore it isn't.


07 Jul 2010 - 20:182813
Missing Sector Types
This is a patch which should restore the missing sector types 5-9 to the TBA world files (based on current (v223) TBA SVN:

http://www.cs.binghamton.edu/~sgreene/tba_sectortypes.sgreene.patch005.txt

Since this is a complicated thing to do, I figured I could help out by scripting this update based on the old circle world files, which still have this info intact. So, this is the result of a script (several, actually), but I have read it, and it seems to be entirely correct (but I could have missed something here, of course).


09 Jul 2010 - 16:222818
Thanks, cleaned up the last of the triggers you found. It will take me a bit to go through the water sector types, thanks for doing that, very tedious I imagine. I just took a quick look at your patch and you set a few desert rooms to water in zone 53 at the very end. I'll look through them all and post the ones I don't change.


__________________
Rumble
The Builder Academy
tbamud.com 9091
09 Jul 2010 - 19:342821
Those are sector type 5 (which I also restored). Type 5 is "MOUNTAIN", is it not? I verified this in tba's src/structs.h before I wrote the script. The changes to zone 53 seem to be adding back the MOUNTAIN sector type to the climbing of the great pyramid, which seemed right to me.

...or did I miss something?


10 Jul 2010 - 02:042824
Nope, you are right. I just skimmed through it and didn't look at the values. Thanks.


__________________
Rumble
The Builder Academy
tbamud.com 9091
12 Jul 2010 - 02:422832
Added your patch, looks like it went in fine with no problems. Thanks again and standing by for your next round.


__________________
Rumble
The Builder Academy
tbamud.com 9091
18 Jul 2010 - 16:382890
Yep, syncing my codebase with svn's world files shows the only difference is my "optimization" above. I will post my next "issue" in a separate thread in a few minutes, as it's kinda "different".

Hmm, apparently I like using "quotes" today. ;)


Login to reply  Page: « < 1 of 1 > »