π
<-

Bug du désespoir

Pour TI-Nspire OS 3.0 ou ultérieur.

Bug du désespoir

Message non lude technolapin » 08 Mai 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: Tout sélectionner
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
Avatar de l’utilisateur
technolapin
Niveau 13: CU (Calculateur Universel)
Niveau 13: CU (Calculateur Universel)
Prochain niv.: 97.8%
 
Messages: 514
Images: 25
Inscription: 31 Déc 2012, 10:48
Localisation: Chez moi
Genre: Homme
Calculatrice(s):
MyCalcs profile
Classe: Chui en vacance ducon

Re: Bug du désespoir

Message non lude Adriweb » 08 Mai 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: Tout sélectionner
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: Tout sélectionner
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
Avatar de l’utilisateur
AdriwebAdmin
Niveau 16: CC2 (Commandeur des Calculatrices)
Niveau 16: CC2 (Commandeur des Calculatrices)
Prochain niv.: 79.9%
 
Messages: 14838
Images: 1131
Inscription: 01 Juin 2007, 00:00
Localisation: France
Genre: Homme
Calculatrice(s):
MyCalcs profile
Twitter/X: adriweb
GitHub: adriweb

Re: Bug du désespoir

Message non lude technolapin » 08 Mai 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à :\
Dernière édition par technolapin le 08 Mai 2014, 13:23, édité 1 fois.
Votez Kasane Teto 2017
Avatar de l’utilisateur
technolapin
Niveau 13: CU (Calculateur Universel)
Niveau 13: CU (Calculateur Universel)
Prochain niv.: 97.8%
 
Messages: 514
Images: 25
Inscription: 31 Déc 2012, 10:48
Localisation: Chez moi
Genre: Homme
Calculatrice(s):
MyCalcs profile
Classe: Chui en vacance ducon

Re: Bug du désespoir

Message non lude matref » 08 Mai 2014, 13:23

Chercher des bugs dans un programme qui simule des bestioles ... marrant.
Avatar de l’utilisateur
matref
Niveau 15: CC (Chevalier des Calculatrices)
Niveau 15: CC (Chevalier des Calculatrices)
Prochain niv.: 25%
 
Messages: 506
Inscription: 11 Déc 2011, 03:08
Localisation: France, Châteaurenard
Genre: Homme
Calculatrice(s):
MyCalcs profile
Classe: Prépa MPSI

Re: Bug du désespoir

Message non lude Levak » 08 Mai 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
Avatar de l’utilisateur
LevakAdmin
Niveau 14: CI (Calculateur de l'Infini)
Niveau 14: CI (Calculateur de l'Infini)
Prochain niv.: 98.9%
 
Messages: 6414
Images: 22
Inscription: 27 Nov 2008, 00:00
Localisation: 0x1AACC355
Genre: Homme
Calculatrice(s):
MyCalcs profile
Classe: BAC+5: Epita (ING3)

Re: Bug du désespoir

Message non lude technolapin » 08 Mai 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
Avatar de l’utilisateur
technolapin
Niveau 13: CU (Calculateur Universel)
Niveau 13: CU (Calculateur Universel)
Prochain niv.: 97.8%
 
Messages: 514
Images: 25
Inscription: 31 Déc 2012, 10:48
Localisation: Chez moi
Genre: Homme
Calculatrice(s):
MyCalcs profile
Classe: Chui en vacance ducon

Re: Bug du désespoir

Message non lude Levak » 08 Mai 2014, 14:14

technolapin a écrit: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
Avatar de l’utilisateur
LevakAdmin
Niveau 14: CI (Calculateur de l'Infini)
Niveau 14: CI (Calculateur de l'Infini)
Prochain niv.: 98.9%
 
Messages: 6414
Images: 22
Inscription: 27 Nov 2008, 00:00
Localisation: 0x1AACC355
Genre: Homme
Calculatrice(s):
MyCalcs profile
Classe: BAC+5: Epita (ING3)

Re: Bug du désespoir

Message non lude Adriweb » 08 Mai 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: Tout sélectionner
---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
Avatar de l’utilisateur
AdriwebAdmin
Niveau 16: CC2 (Commandeur des Calculatrices)
Niveau 16: CC2 (Commandeur des Calculatrices)
Prochain niv.: 79.9%
 
Messages: 14838
Images: 1131
Inscription: 01 Juin 2007, 00:00
Localisation: France
Genre: Homme
Calculatrice(s):
MyCalcs profile
Twitter/X: adriweb
GitHub: adriweb

Re: Bug du désespoir

Message non lude Levak » 08 Mai 2014, 14:37

Change
Code: Tout sélectionner
   if self.iseating then
      comportements[comportementslist[self.genom.dowheneating]](self)
   end
   if self.iseated then
      comportements[comportementslist[self.genom.dowheneated]](self)
   end


en
Code: Tout sélectionner
   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
Avatar de l’utilisateur
LevakAdmin
Niveau 14: CI (Calculateur de l'Infini)
Niveau 14: CI (Calculateur de l'Infini)
Prochain niv.: 98.9%
 
Messages: 6414
Images: 22
Inscription: 27 Nov 2008, 00:00
Localisation: 0x1AACC355
Genre: Homme
Calculatrice(s):
MyCalcs profile
Classe: BAC+5: Epita (ING3)

Re: Bug du désespoir

Message non lude Adriweb » 08 Mai 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
Avatar de l’utilisateur
AdriwebAdmin
Niveau 16: CC2 (Commandeur des Calculatrices)
Niveau 16: CC2 (Commandeur des Calculatrices)
Prochain niv.: 79.9%
 
Messages: 14838
Images: 1131
Inscription: 01 Juin 2007, 00:00
Localisation: France
Genre: Homme
Calculatrice(s):
MyCalcs profile
Twitter/X: adriweb
GitHub: adriweb

Suivante

Retourner vers Nspire-Lua

Qui est en ligne

Utilisateurs parcourant ce forum: ClaudeBot [spider] et 7 invités

-
Rechercher
-
Social TI-Planet
-
Sujets à la une
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
-
Faire un don / Premium
Pour plus de concours, de lots, de tests, nous aider à payer le serveur et les domaines...
Faire un don
Découvrez les avantages d'un compte donateur !
JoinRejoignez the donors and/or premium!les donateurs et/ou premium !


Partenaires et pub
Notre partenaire Jarrety Calculatrices à acheter chez Calcuso
-
Stats.
2117 utilisateurs:
>2043 invités
>68 membres
>6 robots
Record simultané (sur 6 mois):
6892 utilisateurs (le 07/06/2017)
-
Autres sites intéressants
Texas Instruments Education
Global | France
 (English / Français)
Banque de programmes TI
ticalc.org
 (English)
La communauté TI-82
tout82.free.fr
 (Français)