Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon. Entire thread

Weird Lua bug(?)

Name: Anonymous 2007-11-19 14:12

Was attempting to write an ETHIOPIAN NIGGER-SCALE SOLUTION to the problem posed by the OP of this thread: http://dis.4chan.org/read/prog/1195330684/ when I ran into a really odd bug:
n,t=io.read("*number"),{}
while n~=0 do table.insert(t,n) end
for i,v in ipairs(t) do print(i,v) end


Run this code, it will prompt you for a number, enter one and hit return: it will eat as much memory and CPU cycles as possible.

What the shit?

Name: Anonymous 2007-11-20 16:28

function blue_water()
{
   while(1) // a loop that is always true
   {
      if (fox.position == in_blue_water) // if the fox is in the blue water
      {
         fox.health = 0; // the fox dies as it's health is being set to 0
      }
     
      if (fox.position != in_blue_water) // if the fox is not in the blue water
      {
         fox.wants_to_get_wet = true; // flag being set to true to make the fox want to get wet
      }
     
      wait(1); // process once each game frame
   }
}

Newer Posts
Don't change these.
Name: Email:
Entire Thread Thread List