On 26 April 2012 05:50, Adam Perry <[email protected]> wrote:
> On Tue, Apr 24, 2012 at 1:33 PM, James Paige <[email protected]> wrote:
>> On Tue, Apr 24, 2012 at 12:50:12PM -0700, Adam Perry wrote:
>>> >> I think one or both of import globals and export globals is busted. I
>>> >> was working with essentially the following script:
>>> >>
>>> >> script, myscript, begin
>>> >>
>>> >> if (import globals(1, 1) == 0) then (
>>> >>   write global(1, 1)
>>> >>   do other stuff
>>> >>   export globals(1)
>>> >> ) else (
>>> >>   import globals(1)
>>> >> )
>>> >>
>>> >> end
>>> >>
>>> >> I expected that the game would initialize on the first run, and would
>>> >> thereafter load in the save data. However, this never happened. The
>>> >> conditional isn't the problem; I tried other things like save slot
>>> >> used and it gave me the same effect.
>>> >>
>>> >> I ended up using save in slot and load from slot to do essentially the
>>> >> same thing, so I'm not waiting on this or anything, but I'm pretty
>>> >> sure it's not working right.
>>> >
>>> > After a single run of this script, with no gamename.saves folder in
>>> > existance, is gamename.saves/1.rsav created ? If so, can you send me a
>>> > copy of it?
>>>
>>> No - I did get a 0.rsav, but I have since deleted it.
>>
>> Oh, my mistake. importglobals numbers slots from 1 to 32, but the save
>> slots are numbered 0 to 31 internally.
>>
>
> While I no longer have the save data, it should be easy enough to
> replicate this bug:
>
> plotscript, show global, begin
>   import globals(1)
>   show value(read global(1))
> end
>
> Because while I can't confirm whether export globals is working, I am
> fairly certain import globals is not.

I assume that you are using a recent (several months) nightly. Hawk
already reported that import globals was broken last year, so I fixed
it. And then I wrote lots of testcases. Would be pretty embarrassing
if my test cases missed that.
_______________________________________________
Ohrrpgce mailing list
[email protected]
http://lists.motherhamster.org/listinfo.cgi/ohrrpgce-motherhamster.org

Reply via email to