Advertisement
Spirit13300

Untitled

May 28th, 2020
349
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.51 KB | None | 0 0
  1. rednet.open("left")
  2.  
  3.  
  4.  
  5. Joueur = {mise = 0}
  6. __meta = {__index = Joueur}
  7.  
  8. function Joueur.new(miseDepart, nom, id)
  9. self.mise = miseDepart
  10. self.pseudo = nom
  11. return setmetatable({}, __meta)
  12. end
  13.  
  14.  
  15. object = Joueur.new(100,"spike",42)
  16. object.mise = 100
  17. print(object.pseudo)
  18.  
  19. tableau = {}
  20. tableau.insert(tableau,"joueur"..cpt)
  21.  
  22. while true do
  23.  
  24. id,mess = rednet.receive()
  25.  
  26. if (mess == "jouer") then
  27. joueur..cpt = Joueur.new(0,"inconnu",id)
  28.  
  29.  
  30. end
  31. print(id)
  32. print(mess)
  33.  
  34.  
  35.  
  36. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement