Jump to content

[Script] Help with message boxes


wmmitchell

Recommended Posts

Hello I am working on a script for my ammo swap mod. What I want it to do is initially prompt a message, then based off the selection of the first message prompt one of two other messages. This is what it looks like:

  Reveal hidden contents

 

 

I get the error "function variable ButtonPressed may not shadow a previously defined variable". As a workaround I just made one super long message with 20 selections but that isn't really ideal as it feels clunky.

I am fairly novice when it comes to scripting and am still trying to teach myself things. Any help would be appreciated.

Link to comment
Share on other sites

  On 9/16/2022 at 8:19 AM, RaidersClamoring said:

Just remove the "Int" from "int ButtonPressed = V_50Ammo.show()" and you will get rid of that message. That's what it means by "shadowing", declaring it twice.

 

Thank you that worked! I figured it was probably something simple.

Link to comment
Share on other sites

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...