I need a timer but

Place to get help with not working mods / modding interface.
Post Reply
archie11
Burner Inserter
Burner Inserter
Posts: 16
Joined: Sat Oct 03, 2015 11:42 pm
Contact:

I need a timer but

Post by archie11 »

you cant use the words game,script or event.
those 3 just make 1 error after another, most likely its a total no brainer but i am to dumb to see how to get it done.
any help would be greatly appreciated

MrDoomah
Fast Inserter
Fast Inserter
Posts: 196
Joined: Mon Jun 01, 2015 1:11 pm
Contact:

Re: I need a timer but

Post by MrDoomah »

And why exactly can't you use game, script or event?

archie11
Burner Inserter
Burner Inserter
Posts: 16
Joined: Sat Oct 03, 2015 11:42 pm
Contact:

Re: I need a timer but

Post by archie11 »

the word game in the timer gives you an error it is now a nil value
the word script sometimes comes back as a nil value or an unknown entity
event comes back as unrecognized almost all the time

User avatar
DaveMcW
Smart Inserter
Smart Inserter
Posts: 3700
Joined: Tue May 13, 2014 11:06 am
Contact:

Re: I need a timer but

Post by DaveMcW »

timer.start_tick = game.tick

current_time = game.tick - timer.start_tick

ratchetfreak
Filter Inserter
Filter Inserter
Posts: 952
Joined: Sat May 23, 2015 12:10 pm
Contact:

Re: I need a timer but

Post by ratchetfreak »

We are not psychic. Unless you show what you tried we can only guess at what is wrong.

archie11
Burner Inserter
Burner Inserter
Posts: 16
Joined: Sat Oct 03, 2015 11:42 pm
Contact:

Re: I need a timer but

Post by archie11 »

i told you several times those words wont work since its more fun to kick me in the head than help
ill just have to take years that i dont have to learn yet another language that im gonna use once or twice.
the way that the timers in some of these mods are written changing game to script is just not getting it done it throws 1 error after another
im not gonna post some other fellas hard work on this lack of help forum to have it flamed.
this sorta works -- but really not recommended for the more complex mods
thanks for your help. i figured id get laughed right outta here anyway
always easier to laugh at the 1 armed dumb guy asking stupid questions than to actually help

User avatar
prg
Filter Inserter
Filter Inserter
Posts: 947
Joined: Mon Jan 19, 2015 12:39 am
Contact:

Re: I need a timer but

Post by prg »

You're doing it wrong.
archie11 wrote:you cant use the words game,script or event.
those 3 just make 1 error after another, most likely its a total no brainer but i am to dumb to see how to get it done.
any help would be greatly appreciated
You most certainly can use those words. But... you should start by explaining what you're trying to accomplish in the first place, I still have no idea after that post. If you're getting some error, you should post the code causing that error and the exact error message.
archie11 wrote:the word game in the timer gives you an error it is now a nil value
the word script sometimes comes back as a nil value or an unknown entity
event comes back as unrecognized almost all the time

Code: Select all

require "defines"

script.on_event(defines.events.on_tick, function(event)
    game.players[1].print(event.tick) --don't do that in production code
end)
Worksforme.

Maybe you should try to explain what this "timer" is supposed to do and what you've tried so far.
archie11 wrote:i told you several times those words wont work since its more fun to kick me in the head than help
ill just have to take years that i dont have to learn yet another language that im gonna use once or twice.
the way that the timers in some of these mods are written changing game to script is just not getting it done it throws 1 error after another
im not gonna post some other fellas hard work on this lack of help forum to have it flamed.
this sorta works -- but really not recommended for the more complex mods
thanks for your help. i figured id get laughed right outta here anyway
always easier to laugh at the 1 armed dumb guy asking stupid questions than to actually help
Wow, are you off your meds or something? People are asking for clarification and you're feeling insulted already? Could you provide an example of where someone is "kicking you in the head" or "laughing at you" or of whatever injustice has been done to you? If the help you're getting here is lacking, it's not an issue with the forum I think.
Automatic Belt (and pipe) Planner—Automate yet another aspect of constructing your factory!

SirRichie
Fast Inserter
Fast Inserter
Posts: 244
Joined: Wed Feb 25, 2015 4:50 pm
Contact:

Re: I need a timer but

Post by SirRichie »

I clearly want to second prg.

First, you do not follow the guidelines on how to ask help, by explaining what you want to achieve and what exactly is not working for you and what you have tried.
Then people are kind enough to ask for clarification and suddenly there is grieving for no reason.
A guy whose 3 out of 8 posts are in this thread complains about the forum... :?

User avatar
Smarty
Global Moderator
Global Moderator
Posts: 816
Joined: Sat Oct 04, 2014 5:00 pm
Contact:

Re: I need a timer but

Post by Smarty »

archie11 wrote:i told you several times those words wont work since its more fun to kick me in the head than help
ill just have to take years that i dont have to learn yet another language that im gonna use once or twice.
the way that the timers in some of these mods are written changing game to script is just not getting it done it throws 1 error after another
im not gonna post some other fellas hard work on this lack of help forum to have it flamed.
this sorta works -- but really not recommended for the more complex mods
thanks for your help. i figured id get laughed right outta here anyway
always easier to laugh at the 1 armed dumb guy asking stupid questions than to actually help
Please stay nice they are trying to help and not "trying to kick you in the head"

User avatar
Smarty
Global Moderator
Global Moderator
Posts: 816
Joined: Sat Oct 04, 2014 5:00 pm
Contact:

Re: I need a timer but

Post by Smarty »

so lets start again.
you have a problem and we need to know exactly what the error is that you get. So to solve the problem we need to know these things

Factorio Version
The command or piece of code that is giving the error
The error itself

Post Reply

Return to “Modding help”