On Sat, Oct 01, 2011 at 08:48:21AM -0700, Adam Perry wrote: > On Sat, Oct 1, 2011 at 3:16 AM, Ralph Versteegen <[email protected]> wrote: > > On 1 October 2011 11:41, James Paige <[email protected]> wrote: > >> On Fri, Sep 30, 2011 at 02:50:51PM -0700, Adam Perry wrote: > >>> Here's a patch adding a bunch of new commands. With this patch, I'll > >>> no longer need the non-canonical parameters for read enemy data, so > >>> you can proceed with your crazy plan. > > > > Wow, great! > > > > BTW, do you prefer to be credited as Mogri or Adam Perry? James used > > 'Mogri' for the last patch, so there's a mix of the two in > > whatsnew.txt > > > >> For some reason the plotdict.xml and yetmore.bas parts don't want to > >> apply... which is strange, because I can't see any obvious problem. > > > > The patch claims to be against revisions 190 and 191! Also, it > > includes the door commands again in the patch to plotdict.xml > > > >> Anyway, I'll figure it out, and test the patch. > > > > The attack commands don't subtract 1 from the attack ID. > > > > Several of the commands which take only one argument are declared as > > taking two in plotscr.hsd. > > > > It's worth noting that that loadenemydata defaults to reading from the > > original DT1 lump instead of the copy that writeenemydata writes. This > > is OK since you shouldn't be using writeenemydata on any of these > > things anyway, but we might as well fix those. > > > > Use bound_arg instead of in_bound when checking script arguments so > > that you get told if you pass a bad arguments. Likewise, explicitly > > pass 5 as the errorlevel to bound_arg (though if we implement my plan > > for script errors in my other post, it'll matter a lot less) > > > > I think "read attack item" should return the nth specified item rather > > than the item in the nth slot. (Maybe this could be handled in > > loadattackdata.) Also, it's broken because you need to subtract 1 from > > the .id member (and our internal item adding/removing functions pass > > around ID+1 as well, ugh!). > > > Many of the plotscripting commands pass around ID+1 as well, if I'm > not mistaken. If we're consistently wrong, that's kind of like being > right.
As far as I know attack ID numbers are the only off-by-one exposed to plotscripting. There is indeed an off-by one on the freebasic code for adding and removing items. This error should remain internal and should NOT be exposed to plotscripting. That is why you have to subtract 1 from the item id number before the plotscripting command returns it. So you are correct, if we are consistently wrong that is kind of like being right-- but being consistently wrong is now always as straightforward as it might appear :) --- James _______________________________________________ Ohrrpgce mailing list [email protected] http://lists.motherhamster.org/listinfo.cgi/ohrrpgce-motherhamster.org
