π
<-

Bug du désespoir

Pour TI-Nspire OS 3.0 ou ultérieur.

Bug du désespoir

Unread postby technolapin » 08 May 2014, 11:12

Bien le bonjour,
je suis en train de coder un programme qui simule l'évolution d'un groupe de bestioles en fonction des mutations de leur génome.
Et puis, là, je désespère de tomber tout le temps sur le même bug:

dans une fonction dist (a, b) qui retourne la distance entre les deux objets, ça me dit tout le temps que b.x n'existe pas (alors qu'aucun objet déclaré au cour de mon programme ne peut ne pas avoir de coordonnées).

voilà le code, avec l'espoir que quelqu'un connaisse la solution: ( attention : il est très long et très bordélique)

Code: Select all
function on.resize (ww, hh)
w, h = ww, hh
cx,cy = 0, 0
clonagespeed = 20
consomationspeed = 2000
signlive = 64
obj = {}
for n = 1, 8 do
  obj[#obj+1] = anim ( math.random (0, w)
                     , math.random (0, h)
                     , math.random (4, 8)
                     , randomgenom ()
                     )
end
for a = 1, 3 do
  table.insert (obj, {t="food", x=math.random (1, w), y=math.random (1, h), energy=256})
end
timer.start (0.01)
end

function randomgenom ()
local g = {}
for a, b in pairs (limitstatus) do
  g[a] =math.random (b[1], b[2])
end
return g
end

entities = {
  [1] = "food"
, [2] = "poison"
, [3] = "anim"
, [4] = "signal"
}

genlist = {
  "color"
, "capacity"
, "speed"
, "clonagerate"
, "range"
, "energyconsume"
, "feelsecurit"
, "imunity"
, "vampiric"
, "toxinecost"

, "producetoxine"
, "canfix"
, "canemitsignal"

, "candetect"
, "canreceivesignal"

, "attractby"
, "repulseby"

, "dowheneating"
, "dowheneated"
, "dowhenreceive"
, "dowhendetect"
}
comportementslist = {
  [0] = "nothing"
, [1] = "go"
, [2] = "runaway"
, [3] = "clone"
, [4] = "emitsignal"
, [5] = "producetoxine"
, [6] = "fix"

}

limitstatus = {
  color = {0, 16777215}
, capacity = {4, 16}
, speed = {1, 4}
, clonagerate = {-8, -4}
, range = {4, 64}
, energyconsume = {-9, -1}
, feelsecurit = {4, 256}
, imunity = {0, 9}
, producetoxine = {0, 9}
, vampiric = {0, 1}
, canfix = {0, 1}
, candetect = {0, 4}
, attractby = {0, 4}
, repulseby = {0, 4} -- valeur representant l'entite
, canemitsignal = {0, 1}
, canreceivesignal = {0, 1}
, toxinecost = {-99, 0}

, dowheneating = {0, #comportementslist}
, dowheneated = {0, #comportementslist}
, dowhenreceive = {0, #comportementslist}
, dowhendetect = {0, #comportementslist}
}


comportements = {
  nothing = function () end
, go = function (o, x, y)
         o.target = {x=x, y=y}
        end
, runaway = function (o, x, y)
             o.runfrom = {x=x, y=y}
            end
, clone = function (o)
           if o.cool < o.genom.clonagerate*clonagespeed then
            o.energy = o.energy/2
            table.insert (obj, anim (o.x+math.random (-4, 4), o.y+math.random (-4, 4), o.energy, mute (o.genom)))
            o.cool = o.genom.clonagerate
           end
          end
, emitsignal = function (o, x, y)
                table.insert (obj, {t="signal", x=x, y=y, signlive})
               end
, producetoxine = function (o, x, y, lvl)
                   table.insert (obj, {t=toxin, lvl = lvl, x=x, y=y})
                  end
, fix = function (o, x, y)
         
        end

}



anim = class ()

function anim: init (x, y, energy, genom)
self.t = "anim"
self.x = x
self.y = y
self.energy = energy
self.genom = genom
self.cool = self.genom.clonagerate
end

function anim: paint (gc)
gc: setColorRGB (self.genom.color)
gc: fillArc (self.x-self.energy/2, self.y-self.energy/2, self.energy, self.energy, 0, 360)
if iseating then
  setColorRGB (255, 0, 0)
else
  gc: setColorRGB (0)
end
gc: drawArc (self.x-self.genom.capacity/2, self.y-self.genom.capacity/2, self.genom.capacity, self.genom.capacity, 0, 360)
end

function anim: move ()
if self.target and not self.runfrom then
  if dist (self, self.target) < self.genom.range then
   self.target = false
  else
   if self.target.x > self.x then
    self.x = self.x+self.genom.speed
   elseif self.target.x < self.x then
    self.x = self.x-self.genom.speed
   end
   if self.target.y > self.y then
    self.y = self.y+self.genom.speed
   elseif self.target.y < self.y then
    self.y = self.y-self.genom.speed
   end
  end
end
if self.runfrom then
  if dist (self, self.runfrom) < self.genom.feelsecurit then
   self.runfrom = false
  else
   if self.runfrom.x > self.x then
    self.x = self.x+self.genom.speed
   elseif self.runfrom.x < self.x then
    self.x = self.x-self.genom.speed
   end
   if self.runfrom.y > self.y then
    self.y = self.y+self.genom.speed
   elseif self.runfrom.y < self.y then
    self.y = self.y-self.genom.speed
   end
  end
end
if not self.target and not self.runfrom then
  self.target = {x=math.random (1, w), y = math.random (1, h)}
end
end

function anim: eat ()
local f = false
for a, b in pairs (obj) do
  if b.t == "food"
and dist (self, b) < self.genom.range*10 then
   f = b
   break
  end
end
if not f and self.genom.vampiric then
  for a, b in pairs (obj) do
   if b ~= self
  and b.t == "anim"
  and dist (self, b) < self.genom.range*10 then
    f = b
    break
   end
  end
end
  if f then
   f.energy = f.energy-1
   self.energy = self.energy+1
   self.iseating = true
  end
end

function anim: reaction ()
if self.iseating then
  comportements[comportementslist[self.genom.dowheneating]] (self)
end
if self.iseated then
  comportements[comportementslist[self.genom.dowheneated]] (self)
end
if self.genom.canreceivesignal ~= 0 then
  for a, b in pairs (obj) do
   if b.t == "signal" then
    comportements[comportementslist[self.genom.dowhenreceive]] (self, b.x, b.y)
   end
  end
end
if self.genom.candetect ~= 0 then
  for a, b in pairs (obj) do
   if entities[self.genom.candetect] == b.t
  and dist (self, b) < self.genom.range then
    comportements[comportementslist[self.genom.dowhendetect]] (self, b.x, b.y)
   end
  end
end
end





function dist (a, b)
return math.sqrt(math.pow (
a.x
-b.x, 2) + math.pow (
a.y
-b.y, 2))
end

function mute (genom)
local gen = {}
for a, b in pairs (genom) do
  gen[a] = b
end

local n = genlist[math.random (1, #genlist)]
local m = math.random (-1, 1)
gen[n] = gen[n] + m

if gen[n] < limitstatus[n][1]
or gen[n] > limitstatus[n][2] then
  gen[n] = genom[n]
else
  while true do
   local r = genlist[math.random (1, #genlist)]
   if limitstatus[r][1] <= gen[r] then
    break
   else
    gen[r] = gen[r]-1
   end
  end
end
return gen
end


function on.paint (gc)
for a, b in pairs (obj) do
  if b.t == "anim" then
   b.cool = b.cool-1
   b: eat ()
   b: move ()
   b: reaction ()
   die (a, b)
   b: paint (gc)
   b.energy = b.energy+b.genom.energyconsume/consomationspeed
  elseif b.t and b.x and b.y then
   die (a, b)
   draw[b.t] (gc, b.x, b.y)
   if b.t == "signal" then
    table.remove (obj, a)
   end
  end
end
end

draw = {
  food = function (gc, x, y)
          gc: setColorRGB (255, 255, 0)
          gc: fillRect (x-4, y-4, 4, 4)
         end
, poison = function (gc, x, y)
            gc: setColorRGB (0, 255, 0)
            gc: fillRect (x-4, y-4, 4, 4)
           end
, signal = function (gc, x, y)
            gc: setColorRGB (0)
            gc: drawRect (x-4, y-4, 4, 4)
           end

}

function on.timer ()
platform.window: invalidate ()
end

function on.mouseMove (xx, yy)
cx, cy = xx, yy
end


function on.mouseDown ()
table.insert (obj, {t="food", x=cx, y=cy, energy = 256})
end


function die (a, b)
if b.energy and b.energy < 1 then
  table.remove (obj, a)
end
end

Votez Kasane Teto 2017
User avatar
technolapin
Niveau 13: CU (Calculateur Universel)
Niveau 13: CU (Calculateur Universel)
Level up: 97.8%
 
Posts: 514
Images: 25
Joined: 31 Dec 2012, 10:48
Location: Chez moi
Gender: Male
Calculator(s):
MyCalcs profile
Class: Chui en vacance ducon

Re: Bug du désespoir

Unread postby Adriweb » 08 May 2014, 12:23

J'ai juste rendu ton code un peu moins "bordélique", ça aidera tout le monde (y compris toi :D) à lire.

Code: Select all
function on.resize(ww, hh)
   w, h = ww, hh
   cx, cy = 0, 0
   clonagespeed = 20
   consomationspeed = 2000
   signlive = 64
   obj = {}
   for n = 1, 8 do
      obj[#obj + 1] = anim(math.random(0, w), math.random(0, h), math.random(4, 8), randomgenom())
   end
   for a = 1, 3 do
      table.insert(obj, { t = "food", x = math.random(1, w), y = math.random(1, h), energy = 256 })
   end
   timer.start(0.01)
end

function randomgenom()
   local g = {}
   for a, b in pairs(limitstatus) do
      g[a] = math.random(b[1], b[2])
   end
   return g
end

entities = {
   [1] = "food",
   [2] = "poison",
   [3] = "anim",
   [4] = "signal"
}

genlist = {
   "color", "capacity", "speed", "clonagerate", "range", "energyconsume", "feelsecurit", "imunity", "vampiric", "toxinecost", "producetoxine", "canfix", "canemitsignal", "candetect", "canreceivesignal", "attractby", "repulseby", "dowheneating", "dowheneated", "dowhenreceive", "dowhendetect"
}
comportementslist = {
   [0] = "nothing",
   [1] = "go",
   [2] = "runaway",
   [3] = "clone",
   [4] = "emitsignal",
   [5] = "producetoxine",
   [6] = "fix"
}

limitstatus = {
   color = { 0, 16777215 },
   capacity = { 4, 16 },
   speed = { 1, 4 },
   clonagerate = { -8, -4 },
   range = { 4, 64 },
   energyconsume = { -9, -1 },
   feelsecurit = { 4, 256 },
   imunity = { 0, 9 },
   producetoxine = { 0, 9 },
   vampiric = { 0, 1 },
   canfix = { 0, 1 },
   candetect = { 0, 4 },
   attractby = { 0, 4 },
   repulseby = { 0, 4 }, -- valeur representant l'entite
   canemitsignal = { 0, 1 },
   canreceivesignal = { 0, 1 },
   toxinecost = { -99, 0 },
   dowheneating = { 0, #comportementslist },
   dowheneated = { 0, #comportementslist },
   dowhenreceive = { 0, #comportementslist },
   dowhendetect = { 0, #comportementslist }
}


comportements = {
   nothing = function() end,
   go = function(o, x, y)
      o.target = { x = x, y = y }
   end,
   runaway = function(o, x, y)
      o.runfrom = { x = x, y = y }
   end,
   clone = function(o)
      if o.cool < o.genom.clonagerate * clonagespeed then
         o.energy = o.energy / 2
         table.insert(obj, anim(o.x + math.random(-4, 4), o.y + math.random(-4, 4), o.energy, mute(o.genom)))
         o.cool = o.genom.clonagerate
      end
   end,
   emitsignal = function(o, x, y)
      table.insert(obj, { t = "signal", x = x, y = y, signlive })
   end,
   producetoxine = function(o, x, y, lvl)
      table.insert(obj, { t = toxin, lvl = lvl, x = x, y = y })
   end,
   fix = function(o, x, y)
   end
}



anim = class()

function anim:init(x, y, energy, genom)
   self.t = "anim"
   self.x = x
   self.y = y
   self.energy = energy
   self.genom = genom
   self.cool = self.genom.clonagerate
end

function anim:paint(gc)
   gc:setColorRGB(self.genom.color)
   gc:fillArc(self.x - self.energy / 2, self.y - self.energy / 2, self.energy, self.energy, 0, 360)
   if iseating then
      gc:setColorRGB(255, 0, 0)
   else
      gc:setColorRGB(0)
   end
   gc:drawArc(self.x - self.genom.capacity / 2, self.y - self.genom.capacity / 2, self.genom.capacity, self.genom.capacity, 0, 360)
end

function anim:move()
   if self.target and not self.runfrom then
      if dist(self, self.target) < self.genom.range then
         self.target = false
      else
         if self.target.x > self.x then
            self.x = self.x + self.genom.speed
         elseif self.target.x < self.x then
            self.x = self.x - self.genom.speed
         end
         if self.target.y > self.y then
            self.y = self.y + self.genom.speed
         elseif self.target.y < self.y then
            self.y = self.y - self.genom.speed
         end
      end
   end
   if self.runfrom then
      if dist(self, self.runfrom) < self.genom.feelsecurit then
         self.runfrom = false
      else
         if self.runfrom.x > self.x then
            self.x = self.x + self.genom.speed
         elseif self.runfrom.x < self.x then
            self.x = self.x - self.genom.speed
         end
         if self.runfrom.y > self.y then
            self.y = self.y + self.genom.speed
         elseif self.runfrom.y < self.y then
            self.y = self.y - self.genom.speed
         end
      end
   end
   if not self.target and not self.runfrom then
      self.target = { x = math.random(1, w), y = math.random(1, h) }
   end
end

function anim:eat()
   local f = false
   for a, b in pairs(obj) do
      if b.t == "food" and dist(self, b) < self.genom.range * 10 then
         f = b
         break
      end
   end
   if not f and self.genom.vampiric then
      for a, b in pairs(obj) do
         if b ~= self and b.t == "anim" and dist(self, b) < self.genom.range * 10 then
            f = b
            break
         end
      end
   end
   if f then
      f.energy = f.energy - 1
      self.energy = self.energy + 1
      self.iseating = true
   end
end

function anim:reaction()
   if self.iseating then
      comportements[comportementslist[self.genom.dowheneating]](self)
   end
   if self.iseated then
      comportements[comportementslist[self.genom.dowheneated]](self)
   end
   if self.genom.canreceivesignal ~= 0 then
      for a, b in pairs(obj) do
         if b.t == "signal" then
            comportements[comportementslist[self.genom.dowhenreceive]](self, b.x, b.y)
         end
      end
   end
   if self.genom.candetect ~= 0 then
      for a, b in pairs(obj) do
         if entities[self.genom.candetect] == b.t and dist(self, b) < self.genom.range then
            comportements[comportementslist[self.genom.dowhendetect]](self, b.x, b.y)
         end
      end
   end
end


function dist(a, b)
   return math.sqrt(math.pow(a.x - b.x, 2) + math.pow(a.y - b.y, 2))
end

function mute(genom)
   local gen = {}
   for a, b in pairs(genom) do
      gen[a] = b
   end

   local n = genlist[math.random(1, #genlist)]
   local m = math.random(-1, 1)
   gen[n] = gen[n] + m

   if gen[n] < limitstatus[n][1]
         or gen[n] > limitstatus[n][2] then
      gen[n] = genom[n]
   else
      while true do
         local r = genlist[math.random(1, #genlist)]
         if limitstatus[r][1] <= gen[r] then
            break
         else
            gen[r] = gen[r] - 1
         end
      end
   end
   return gen
end


function on.paint(gc)
   for a, b in pairs(obj) do
      if b.t == "anim" then
         b.cool = b.cool - 1
         b:eat()
         b:move()
         b:reaction()
         die(a, b)
         b:paint(gc)
         b.energy = b.energy + b.genom.energyconsume / consomationspeed
      elseif b.t and b.x and b.y then
         die(a, b)
         draw[b.t](gc, b.x, b.y)
         if b.t == "signal" then
            table.remove(obj, a)
         end
      end
   end
end

draw = {
   food = function(gc, x, y)
      gc:setColorRGB(255, 255, 0)
      gc:fillRect(x - 4, y - 4, 4, 4)
   end,
   poison = function(gc, x, y)
      gc:setColorRGB(0, 255, 0)
      gc:fillRect(x - 4, y - 4, 4, 4)
   end,
   signal = function(gc, x, y)
      gc:setColorRGB(0)
      gc:drawRect(x - 4, y - 4, 4, 4)
   end
}

function on.timer()
   platform.window:invalidate()
end

function on.mouseMove(xx, yy)
   cx, cy = xx, yy
end


function on.mouseDown()
   table.insert(obj, { t = "food", x = cx, y = cy, energy = 256 })
end


function die(a, b)
   if b.energy and b.energy < 1 then
      table.remove(obj, a)
   end
end



J'ai un tout petit peu regardé le code, et j'ai une remarque :
Tu as l'air de vouloir "détruire" des objets en les mettant à 'false' :
Code: Select all
if dist(self, self.target) < self.genom.range then
         self.target = false
      else

Les mettre à 'nil' est fait pour ça...
(D'ailleurs, c'est pas à cause de ca, ton erreur ? Si tu regardes un b.y et que b est à 'false'.... ? (pareil pour nil))

Autre chose : il est de coutume d'utiliser la variable '_' pour un pairs() dont la clé n'est pas utilisée. (tu utilises 'a' - c'est pas grave, mais je dis, juste....)

(Aussi, j'ai changé un setColorRGB en un gc:setColorRGB - un simple oubli, j'imagine)

MyCalcs: Help the community's calculator documentations by filling out your calculators info!
MyCalcs: Aidez la communauté à documenter les calculatrices en donnant des infos sur vos calculatrices !
Inspired-Lua.org: All about TI-Nspire Lua programming (tutorials, wiki/docs...)
My calculator programs
Mes programmes pour calculatrices
User avatar
AdriwebAdmin
Niveau 16: CC2 (Commandeur des Calculatrices)
Niveau 16: CC2 (Commandeur des Calculatrices)
Level up: 79.9%
 
Posts: 14836
Images: 1131
Joined: 01 Jun 2007, 00:00
Location: France
Gender: Male
Calculator(s):
MyCalcs profile
Twitter: adriweb
GitHub: adriweb

Re: Bug du désespoir

Unread postby technolapin » 08 May 2014, 13:22

Ah, ça a l'air mieux :) .
Oui ce code est fait complètement à l'arrache, et puisque beaucoup de morceaux de codes ne s’exécutent que sous certaines conditions très spécifiques, je vois pas toutes les erreurs .
Ah oui, aussi, "self.target" est une variable qui peut être à false ou à nil, ça ne change rien ici (ça passe par if self.target then ... end .

[edit] : le bug est toujours là :\
Last edited by technolapin on 08 May 2014, 13:23, edited 1 time in total.
Votez Kasane Teto 2017
User avatar
technolapin
Niveau 13: CU (Calculateur Universel)
Niveau 13: CU (Calculateur Universel)
Level up: 97.8%
 
Posts: 514
Images: 25
Joined: 31 Dec 2012, 10:48
Location: Chez moi
Gender: Male
Calculator(s):
MyCalcs profile
Class: Chui en vacance ducon

Re: Bug du désespoir

Unread postby matref » 08 May 2014, 13:23

Chercher des bugs dans un programme qui simule des bestioles ... marrant.
User avatar
matref
Niveau 15: CC (Chevalier des Calculatrices)
Niveau 15: CC (Chevalier des Calculatrices)
Level up: 25%
 
Posts: 506
Joined: 11 Dec 2011, 03:08
Location: France, Châteaurenard
Gender: Male
Calculator(s):
MyCalcs profile
Class: Prépa MPSI

Re: Bug du désespoir

Unread postby Levak » 08 May 2014, 13:54

Je ne peux pas tester pour le moment, mais l'erreur est-elle "Cannot access field x of nil" ou bien "Cannot access field x" ? En effet, car la première erreur dit que b est nil. Peux-tu poster l'erreur exacte + ligne ?
Responsable design/graphique de TI-Planet
I do not get mad at people, I just want them to learn the way I learnt.
ImageTNOC [topic][DL]
nClock [topic][DL]
HideManager [topic][DL]
ZLock [topic][DL]
Theme Editor [topic][DL]
Mes programmes
User avatar
LevakAdmin
Niveau 14: CI (Calculateur de l'Infini)
Niveau 14: CI (Calculateur de l'Infini)
Level up: 98.9%
 
Posts: 6414
Images: 22
Joined: 27 Nov 2008, 00:00
Location: 0x1AACC355
Gender: Male
Calculator(s):
MyCalcs profile
Class: BAC+5: Epita (ING3)

Re: Bug du désespoir

Unread postby technolapin » 08 May 2014, 14:04

L'erreur se produit toujours à l'unique ligne de la fonction dist (), et indique que b est une table, mais que b.x est nil.
Votez Kasane Teto 2017
User avatar
technolapin
Niveau 13: CU (Calculateur Universel)
Niveau 13: CU (Calculateur Universel)
Level up: 97.8%
 
Posts: 514
Images: 25
Joined: 31 Dec 2012, 10:48
Location: Chez moi
Gender: Male
Calculator(s):
MyCalcs profile
Class: Chui en vacance ducon

Re: Bug du désespoir

Unread postby Levak » 08 May 2014, 14:14

technolapin wrote:L'erreur se produit toujours à l'unique ligne de la fonction dist (), et indique que b est une table, mais que b.x est nil.

L'erreur exacte étant ?
Responsable design/graphique de TI-Planet
I do not get mad at people, I just want them to learn the way I learnt.
ImageTNOC [topic][DL]
nClock [topic][DL]
HideManager [topic][DL]
ZLock [topic][DL]
Theme Editor [topic][DL]
Mes programmes
User avatar
LevakAdmin
Niveau 14: CI (Calculateur de l'Infini)
Niveau 14: CI (Calculateur de l'Infini)
Level up: 98.9%
 
Posts: 6414
Images: 22
Joined: 27 Nov 2008, 00:00
Location: 0x1AACC355
Gender: Male
Calculator(s):
MyCalcs profile
Class: BAC+5: Epita (ING3)

Re: Bug du désespoir

Unread postby Adriweb » 08 May 2014, 14:28

205: attempt to perform arithmetic on field 'x' (a nil value)


En foutant des print sur le dist(), on peut voir de quoi est fait b quand ca plante :

Code: Select all
---debut---
1   64
t   signal
---fin---

MyCalcs: Help the community's calculator documentations by filling out your calculators info!
MyCalcs: Aidez la communauté à documenter les calculatrices en donnant des infos sur vos calculatrices !
Inspired-Lua.org: All about TI-Nspire Lua programming (tutorials, wiki/docs...)
My calculator programs
Mes programmes pour calculatrices
User avatar
AdriwebAdmin
Niveau 16: CC2 (Commandeur des Calculatrices)
Niveau 16: CC2 (Commandeur des Calculatrices)
Level up: 79.9%
 
Posts: 14836
Images: 1131
Joined: 01 Jun 2007, 00:00
Location: France
Gender: Male
Calculator(s):
MyCalcs profile
Twitter: adriweb
GitHub: adriweb

Re: Bug du désespoir

Unread postby Levak » 08 May 2014, 14:37

Change
Code: Select all
   if self.iseating then
      comportements[comportementslist[self.genom.dowheneating]](self)
   end
   if self.iseated then
      comportements[comportementslist[self.genom.dowheneated]](self)
   end


en
Code: Select all
   if self.iseating then
      comportements[comportementslist[self.genom.dowheneating]](self, self.x, self.y)
   end
   if self.iseated then
      comportements[comportementslist[self.genom.dowheneated]](self, self.x, self.y)
   end
Responsable design/graphique de TI-Planet
I do not get mad at people, I just want them to learn the way I learnt.
ImageTNOC [topic][DL]
nClock [topic][DL]
HideManager [topic][DL]
ZLock [topic][DL]
Theme Editor [topic][DL]
Mes programmes
User avatar
LevakAdmin
Niveau 14: CI (Calculateur de l'Infini)
Niveau 14: CI (Calculateur de l'Infini)
Level up: 98.9%
 
Posts: 6414
Images: 22
Joined: 27 Nov 2008, 00:00
Location: 0x1AACC355
Gender: Male
Calculator(s):
MyCalcs profile
Class: BAC+5: Epita (ING3)

Re: Bug du désespoir

Unread postby Adriweb » 08 May 2014, 14:48

Oui, c'est mieux, mais j'ai eu ensuite des problème du genre : "script stopped : memory exhausted" (tu dois mal gérer qqchose.....)
et aussi :
gc:fillArc(self.x - self.energy / 2, self.y - self.energy / 2, self.energy, self.energy, 0, 360)
=> 110: bad argument #3 to 'fillArc' (value must be >= 0)

MyCalcs: Help the community's calculator documentations by filling out your calculators info!
MyCalcs: Aidez la communauté à documenter les calculatrices en donnant des infos sur vos calculatrices !
Inspired-Lua.org: All about TI-Nspire Lua programming (tutorials, wiki/docs...)
My calculator programs
Mes programmes pour calculatrices
User avatar
AdriwebAdmin
Niveau 16: CC2 (Commandeur des Calculatrices)
Niveau 16: CC2 (Commandeur des Calculatrices)
Level up: 79.9%
 
Posts: 14836
Images: 1131
Joined: 01 Jun 2007, 00:00
Location: France
Gender: Male
Calculator(s):
MyCalcs profile
Twitter: adriweb
GitHub: adriweb

Next

Return to Nspire-Lua

Who is online

Users browsing this forum: ClaudeBot [spider] and 0 guests

-
Search
-
Social TI-Planet
-
Featured topics
Comparaisons des meilleurs prix pour acheter sa calculatrice !
"1 calculatrice pour tous", le programme solidaire de Texas Instruments. Reçois gratuitement et sans aucune obligation d'achat, 5 calculatrices couleur programmables en Python à donner aux élèves les plus nécessiteux de ton lycée. Tu peux recevoir au choix 5 TI-82 Advanced Edition Python ou bien 5 TI-83 Premium CE Edition Python.
Enseignant(e), reçois gratuitement 1 exemplaire de test de la TI-82 Advanced Edition Python. À demander d'ici le 31 décembre 2024.
Aidez la communauté à documenter les révisions matérielles en listant vos calculatrices graphiques !
1234
-
Donations / Premium
For more contests, prizes, reviews, helping us pay the server and domains...
Donate
Discover the the advantages of a donor account !
JoinRejoignez the donors and/or premium!les donateurs et/ou premium !


Partner and ad
Notre partenaire Jarrety Calculatrices à acheter chez Calcuso
-
Stats.
1106 utilisateurs:
>1055 invités
>46 membres
>5 robots
Record simultané (sur 6 mois):
6892 utilisateurs (le 07/06/2017)
-
Other interesting websites
Texas Instruments Education
Global | France
 (English / Français)
Banque de programmes TI
ticalc.org
 (English)
La communauté TI-82
tout82.free.fr
 (Français)