fork download
  1. runiu = {}
  2. function CreateUnit()
  3. runit = "hi"
  4. table.insert(runiu,runit)
  5. --~ Lets print out what runit is inside the function ~--
  6. print("Inside the function, runit: " .. runit)
  7. end
  8.  
  9. --~Let's try and access runit after the function is done~--
  10. CreateUnit()
  11. print("After function, runit: " .. runit)
  12.  
Success #stdin #stdout 0s 2844KB
stdin
Standard input is empty
stdout
Inside the function, runit: hi
After function, runit: hi