Jump to content

Help with Crafting Bench Script & "Too few variables" Error


jedp15

Recommended Posts

Hey, just need some script help for this new "workbench" activator I'm working on.

Basically, I'm trying to set it up so that 1 of 3 different prompts will play, depending on the player's Survival skill.

Here's the logic:

1) If user is the player (not an NPC) & their survival skill is >=50

     activate workbench; show message 1 (if skill 50-74) or message 2 (if skill >75); show recipe menu

2) If user is the player (not an NPC) & their survival skill is <50

     show message 3 (that they're dumb & can't use it basically)

3) If user is an NPC

    NPC activates the workbench

Here's the script I wrote:

scn Mortarpestlescript

ref CrusherActivate
ref User

Begin OnActivate
    set User to GetActionRef
    
    if GetActionRef == Player
        if player.GetActorValue Survival >= 50 && CrusherActivate < 1
            set CrusherActivate to 1
            if player.GetActorValue Survival >= 75
                ShowMessage aaEldaelMortarpestleMessage
            else
                ShowMessage aaEldaelMortarpestleMessageSMed
            endif
            player.showrecipemenu aaEldaelMortarPestle
        else
            ShowMessage aaEldaelMortarpestleMessageSLow
        endif
    else
        User.Activate
    endif
    
end

---------------------------------------------------------------------------------

I'm getting this error in the GECK:

"Too few variables in MessageBox parameters; expected 1, found 0"

I have no idea why it's showing this error and I'm unable to save the script. Any help is greatly appreciated!

Link to comment
Share on other sites

Figured it out: I had a % sign in one of the messages instead of %%.

Apart from that, what do you think of the script?

Link to comment
Share on other sites

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...
  翻译: