|
| 23 Jan 2015 07:05 PM |
| How would I use os.time() and datastores to make a login bonus award system? |
|
|
| Report Abuse |
|
Crythox
|
  |
| Joined: 03 Oct 2011 |
| Total Posts: 1188 |
|
|
| 23 Jan 2015 07:16 PM |
| Not sure, but you might want to use a script. |
|
|
| Report Abuse |
|
|
| 23 Jan 2015 07:22 PM |
| Not sure, but you might want to use a script. |
|
|
| Report Abuse |
|
CrowClaws
|
  |
| Joined: 04 Jul 2010 |
| Total Posts: 4466 |
|
|
| 23 Jan 2015 07:23 PM |
| Not sure, but you might want to use a script. |
|
|
| Report Abuse |
|
chimmihc
|
  |
| Joined: 01 Sep 2014 |
| Total Posts: 17143 |
|
|
| 23 Jan 2015 07:25 PM |
| i hear that a script is the way to go |
|
|
| Report Abuse |
|
|
| 23 Jan 2015 07:30 PM |
datastoreservice:UpdateAsync(key,function(old) new = old or os.time() if os.time - new > (60*60*24)) then print'award player' end return os.time() end
you should really be able to take it from here, if you are knowledgeable enough to figure the rest out, you shouldn't try this 'login bonus' out yet. Instead focus on practicing easier tasks.
Also, stop re-posting the same thread over and over just because you aren't getting answers.. |
|
|
| Report Abuse |
|
|
| 23 Jan 2015 07:35 PM |
Hey there, you seem fairly new to the world of scripting. Most everyone here is happy to help any scripter who is learning and stuck along the way. However, nobody is going to make you an entire point awarding system with Data Stores and os.time from scratch.
These can be tough subjects for people still learning, so here is some advice to get some help.
Don't ask people to write you an entire script, and don't start large projects that have multiple concepts you don't understand. I'm sure you have a vision of everything you want in a completed game, well take that vision, and do this:
-Put everything you want in your place into a list, either physical or digital, and save it
-If you have not already, learn the basics of ROBLOX Lua. This is important, because if you don't know the basics, it will be hard to grasp more complicated scripting techniques.
-After you know the basics, and are an intrepid learner, you should be able to know the specific factors of what you need to learn for each task you wish to complete.
-At this point, you research the topic, on the wiki, and on YouTube if there are any tutorials, which there probably are.
-Try out smaller exercises just to see if you grasp the concept, make test scripts that print stuff and create different colored bricks or something, but using the different methods you learned from the wiki.
-If you have trouble with it, copy and paste the script onto the forum and say what you were trying to do with it. Again start off simple, because it is better to get the problem early on because we are able to help you faster with minimal lines of code, and not a wall of text.
-After you have used the techniques properly, apply them to a bigger idea, such as a point awarding system.
-Make it simple at first, but applicable to your goal. Test it often, and whenever you get a problem you can't fix, copy and paste whatever isn't working to this subsection, and say what you were trying to accomplish with your script.
-Continue researching, etc. Don't come here every time you get an error, mess with it, try new things, research stuff, double check your work, read the error logs.
-Make your game.
-???
-Profit.
--
Nobody wants to write you a script, but again most people are happy to help, so give us something to work off of, don't come here empty handed asking for a functional point system from scratch, as you did in another thread an hour ago.
If you ARE NOT wanting to learn, I recommend getting a lot of ROBUX, and offering it up to whoever can make your os.time Data Store point system for you. |
|
|
| Report Abuse |
|