Picture Variable script RGSS Error

Discussion in 'RGSSx Script Support' started by mylafter, Jun 9, 2019.

  1. mylafter

    mylafter Veteran Veteran

    Messages:
    178
    Likes Received:
    80
    First Language:
    English
    Primarily Uses:
    N/A
    I found this script in the VXACE repository thread. I'm using Picture Variables by neonblack. Can be found here.
    It's a script that changes pictures depending on the variables' value. You can read all about how it works in the link.
    Anyway, I'm pretty sure I am doing everything correctly. I've read through the instructions many times but I keep getting an error that says:
    This error occurs when I set the variable value to anything higher than zero, after the corresponding switch is turned ON.
     
    #1
  2. Andar

    Andar Veteran Veteran

    Messages:
    28,413
    Likes Received:
    6,480
    Location:
    Germany
    First Language:
    German
    Primarily Uses:
    RMMV
    please show us your configuration of the script, then we can check what you need for it to work.
    Basically everything until the line "end of configuration"

    please use code-tags to make sure it remains readable code
     
    #2
  3. mylafter

    mylafter Veteran Veteran

    Messages:
    178
    Likes Received:
    80
    First Language:
    English
    Primarily Uses:
    N/A
    So sorry, I just figured out what was causing the error. On line 50 where it says:
    Code:
    0 => nil,
    I replaced the 'nil' with quotation marks and that fixed the problem. I never bothered to change that since it was a part of the og script. Thanks anyway!
     
    #3
  4. Andar

    Andar Veteran Veteran

    Messages:
    28,413
    Likes Received:
    6,480
    Location:
    Germany
    First Language:
    German
    Primarily Uses:
    RMMV
    no, that doesn't fix your problem - it only hides the error message.
    There is a reason why the original scripter placed the nil there, and that you got to that message means that you used the script in the wrong way or configured it wrong.
    Placing an empty string as a filename will never work correctly...
     
    #4
  5. mylafter

    mylafter Veteran Veteran

    Messages:
    178
    Likes Received:
    80
    First Language:
    English
    Primarily Uses:
    N/A
    It seems to work fine though, even when the variable value is set to zero. But just in case, here's my configuration.
    Code:
    VARIABLE_SWITCHES ={
    1 => 1,
    }
    
    PICTURE_VIEWPORT ={
    1 => 2,
    }
    
    PICTURE_Z ={
    1 => 1,
    }
    
    Pictures[1] ={
    0 => '', #< --- originally nil
    1 => 'pic1',
    2 => 'pic2',
    }
    
    FIX_MAP ={
    1 => true,
    }
    
    TINT_MAP ={
    1 => true,
    }
     
    #5

Share This Page