Advertisement
KodingKid

How to make a variable scope in Lua

May 1st, 2021
105
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.46 KB | None | 0 0
  1. first_player = player_1
  2. first_player = "The Original"
  3. if first_player == player_1
  4.     print(first_player)
  5.     local second_player = player_2
  6.     second_player = "The Next One"
  7.     if second_player == player_2
  8.         print(second_player)
  9.         local third_player == player_3
  10.         third_player = "The Other"
  11.         local fourth_player == player_4
  12.         fourth_player == "The Final"
  13.         end
  14.     print(third_player)
  15.     end
  16. print(fourth_player)
  17. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement