Jump to content
Search In
  • More options...
Find results that contain...
Find results in...
Tindrone

DECORATE User variable error

Recommended Posts

Posted (edited)

I'm trying to get user variables working and so far I've been getting this error

"Script error, "rocket man.wad:DECORATE" line 10:
Invalid parameter 'user_rockets'"

Here is my code, which is taken straight from https://zdoom.org/wiki/User_variable:

Spoiler

 

ACTOR SpecialZombieMan : ZombieMan
{
    var int user_rockets;

    States
    {
    Spawn:
        POSS A 0 NoDelay
        { // See anonymous functions.
            user_rockets = 5;
        }

    Idle:
        Goto Super::Spawn

    Missile:
        POSS E 10 A_FaceTarget
        POSS F 8
        {
            If(user_rockets > 0)
            {
                A_CustomMissile("Rocket");
                user_rockets--;
            }
            Else
            {
                A_PosAttack;
            }
        }
        POSS E 8
        Goto See
    }
}

 

Any help would be appreciated

Share this post


Link to post

Works fine for me. Maybe your GZDoom version is too old?

Share this post


Link to post

Thank you that seemed to be my problem, the most recent version I had was from 2016

Share this post


Link to post

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×