Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9243399
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 18, 20262026-06-18T08:48:08+00:00 2026-06-18T08:48:08+00:00

I have the following code: APP.logevent(‘ostime:’..os.time()) APP.logevent(‘random:’..math.random()) APP.logevent(math.randomseed(os.time())) When i check my logs, this

  • 0

I have the following code:

   APP.logevent('ostime:'..os.time())
   APP.logevent('random:'..math.random())
   APP.logevent(math.randomseed(os.time()))

When i check my logs, this is what I get:

Tue Feb  5 11:49:53 2013: ostime:1360082993
Tue Feb  5 11:49:53 2013: random:0.84018771715471
Tue Feb  5 11:49:53 2013: 
machinename:/usr/share/ajj# 

I’m not getting any error messages….
Can you tell me why the call to randomeseed() is failing?
I’ve also tried replacing the call to “os.time()” in the randomseed with a number… and that doesn’t seem to work either.

Thanks.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-18T08:48:10+00:00Added an answer on June 18, 2026 at 8:48 am

    lua math.randomseed returns nothing

    It’s not supposed to. Lua functions are not required to return a values, and there’s no real reason for randomseed to return anything.

    Can you tell me why the call to randomeseed() is failing?

    It’s not.

    EDIT:

    I thought it would create a random number for me.

    That’s what math.random does. randomseed seeds the random number generator, which is to say it sets an initial value that the pseudorandom number generator uses to find the next pseudorandom value. For a given seed (including the default seed, i.e. you never call randomseed), you’ll get the same list of pseudorandom values back every time.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

In my Zend Framework app, I have following code: index.php $app_started_time = time(); layout.phtml
I have the following code in my app: AnotherCursorAdapter adapter = new AnotherCursorAdapter(CadItemActivity.this, R.layout.imgsinternas,
I have the following code: app.get('/games/:id/log', function (req, res) { fs.readFile('logs/' + req.params.id +'.log',
I have the following code: var Company = function(app) { this.crypto = require('ezcrypto').Crypto; var
Let's say I have the following code in Google App Engine: from urllib import
I have the following code in my Backbone app, Is there a way to
I have the following code that allows my console app to go to the
I have the following code: <fx:Script> <![CDATA[ import shared.GlobalsManager; import app.Globals; protected var globals:Globals=GlobalsManager.getGlobals();
In my viewDidLoad method of my iPhone app I have the following code: zombie[i].animationImages
I'm doing a small app in Excel, and I have the following code when

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.