• Just a reminder that providing specifics on, sharing links to, or naming websites where ROMs can be accessed is against the rules. If your post has any of this information it will be removed.
  • Ever thought it'd be cool to have your art, writing, or challenge runs featured on PokéCommunity? Click here for info - we'd love to spotlight your work!
  • Welcome to PokéCommunity! Register now and join one of the best fan communities on the 'net to talk Pokémon and more! We are not affiliated with The Pokémon Company or Nintendo.

[Scripting Question] How can I set a variable?

  • 80
    Posts
    6
    Years
    • Seen Nov 5, 2023
    I want to make a betting facility. Were you see two people against each other and you need to decide who will win
    [PokeCommunity.com] How can I set a variable?

    Here is how I want to execute it (Even though I did not add the random trainer yet, the important part is that the trainer1 and trainer2 is seperate from the trainers thing
    Because here is the problem
    Code:
    trainer1=[:PWT_CYNTHIA,"Cynthia",_I("No matter how fun the battle is, it will always end sometime..."),1]
    trainer2=[:PWT_LANCE,"Lance",1]
    trainers=[trainer1,trainer2]
    pbNPCBattle(trainers)
    works, because trainer 1 and trainer 2 are in the same code block
    but appearently it does not work when I put them seperate as in the Picture

    I am not completly sure how to make it right, I think I will make it so that I set trainer 1 and trainer to a variable that will be used for something like
    Code:
    trainers=[\v[1],\v[2]
    But I am not completly sure how to do that, please help
     
    Back
    Top