Categories > Coding > Lua >

[RELEASE] Fandangler V1.0 - Concentrated Epicness (LUAU RELEASE)

Posts: 34

Threads: 8

Joined: Jul, 2022

Reputation: 10

Posted

This is my fandangler, proprietarily.

I have written this.

 

function generate_random_table()
  local table_length = math.random(10, 100)
  local random_table = {}

  for i = 1, table_length do
    local random_number = math.random(1, 100)
    local random_string = ""
    for j = 1, random_number do
      local random_character = string.char(math.random(97, 122))
      random_string = random_string .. random_character
    end

    local random_table_entry = {
      number = random_number,
      string = random_string
    }

    table.insert(random_table, random_table_entry)
  end

  return random_table
end

function sort_random_table(random_table)
  for i = 1, #random_table do
    for j = i + 1, #random_table do
      if random_table[i].number > random_table[j].number then
        local temp_entry = random_table[i]
        random_table[i] = random_table[j]
        random_table[j] = temp_entry
      end
    end
  end

  return random_table
end

function print_random_table(random_table)
  for i = 1, #random_table do
    print("Table entry #" .. i .. ": " .. random_table[i].number .. " - " .. random_table[i].string)
  end
end

function main()
  math.randomseed(os.time())
  local random_table = generate_random_table()
  print("Generated table:")
  print_random_table(random_table)
  print("\nSorting table...")
  random_table = sort_random_table(random_table)
  print("\nSorted table:")
  print_random_table(random_table)
end

main()
  • 0

veh_handler and seh_handler disliker

<p>enis</p>

Haruka

STD Testing Center

Posts: 56

Threads: 3

Joined: Feb, 2023

Reputation: 5

Replied

this is pretty cool but, i would have done the if the guy is on the benching for the him in i dont like the plus the person in the on the guy over the stove

 

  • 0

https://media.discordapp.net/attachments/979069297374671018/1078367228593971362/VelvetSiggy.png

 

 

Users viewing this thread:

( Members: 0, Guests: 1, Total: 1 )