Jump to content

Photo

[2.55 a92] combodata->D[] resets on screen re-entry


  • Please log in to reply
1 reply to this topic

#1 Mitchfork

Mitchfork

    no fun. not ever.

  • Members
  • Real Name:Mitch
  • Location:Alabama

Posted 20 March 2021 - 11:39 PM

EDIT: THIS TOPIC TITLE IS WRONG.  This is actually referring to the run() input values for combodata scripts.

 

As of ZC 2.55 a92, combodata run() input values are still bugged.

 

Full behavior description:

  • When you enter a screen with a combodata script for the first time, run() input variables will trace normally.
  • If you exit the screen and re-enter, run() input variables will now always trace 0.
  • If you F9 reset the quest, these values will still trace 0, even if you haven't saved.
  • Fully exiting ZC and reopening will restore the "first time" behavior.

It appears that combodata->InitD[] is tracing normally and is not affected by this bug.

 

Relevant ZScript Settings:

  • Clear InitD[] on Script Change is OFF
  • Broken Combodata->InitD[] is OFF

EDIT: I have additionally discovered that this only happens if the combodata script is running while the screen is exited. 

 

For example, this script will trigger the bug:

combodata script demo {
    void run(int a, int b) {
        Trace(a); //This will be incorrect if the screen is re-entered
        Trace(b); //This will be incorrect if the screen is re-entered
        Trace(this->InitD[0]); //This will remain correct
        Trace(this->InitD[1]); //This will remain correct
        while(true) {
            Waitframe();
        }
    }
}
 
This script will not trigger the bug:
combodata script demo {
    void run(int a, int b) {
        Trace(a); //This will remain correct
        Trace(b); //This will remain correct
        Trace(this->InitD[0]); //This will remain correct
        Trace(this->InitD[1]); //This will remain correct
    }
}
 

 


Edited by Mitchfork, 21 March 2021 - 12:11 AM.


#2 Timelord

Timelord

    The Timelord

  • Banned
  • Location:Prydon Academy

Posted 21 March 2021 - 09:25 AM

This preliminary build might fix these issues:

 

http://timelord.inso...zc-dev/2.55/93/




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users