Imitater
|
  |
| Joined: 17 Aug 2012 |
| Total Posts: 29994 |
|
|
| 04 Apr 2015 04:18 PM |
| anyone good at java i need u keith |
|
|
| Report Abuse |
|
|
Imitater
|
  |
| Joined: 17 Aug 2012 |
| Total Posts: 29994 |
|
| |
|
lukrio
|
  |
| Joined: 31 May 2013 |
| Total Posts: 5982 |
|
|
| 04 Apr 2015 04:21 PM |
wat is teh ishoo sir
-indian accent- |
|
|
| Report Abuse |
|
|
PIebeian
|
  |
| Joined: 23 Oct 2011 |
| Total Posts: 6969 |
|
| |
|
Imitater
|
  |
| Joined: 17 Aug 2012 |
| Total Posts: 29994 |
|
|
| 04 Apr 2015 04:22 PM |
i need to store two variables one is name one is year born and then tell them how old they will be next year
i got the name bit but idk how to make it tell how old ur next year |
|
|
| Report Abuse |
|
|
lukrio
|
  |
| Joined: 31 May 2013 |
| Total Posts: 5982 |
|
|
| 04 Apr 2015 04:24 PM |
sorty sor i cannot understand u cant u pls repeet ur kwestion hav u tryd reseteng
-indian accent- |
|
|
| Report Abuse |
|
|
|
| 04 Apr 2015 04:24 PM |
Declare two variables, use the assignment (=) operator.
Don't forget your semi-colon at the end of a statement.
Also, to tell how old you will be next year, add 1 to the value of the first variable. |
|
|
| Report Abuse |
|
|
Imitater
|
  |
| Joined: 17 Aug 2012 |
| Total Posts: 29994 |
|
|
| 04 Apr 2015 04:25 PM |
| can i pm you my code so far |
|
|
| Report Abuse |
|
|
|
| 04 Apr 2015 04:26 PM |
and I'm not by any standard *good* at Java, I read half of a Java book half a year ago and I understand OOP, so I can generally help with most simple Java problems...but good, no.
than again Cong has done a year of Java in school and im still better than her at it |
|
|
| Report Abuse |
|
|
|
| 04 Apr 2015 04:26 PM |
"can i pm you my code so far"
yeah
|
|
|
| Report Abuse |
|
|
kweve
|
  |
| Joined: 04 Jul 2014 |
| Total Posts: 572 |
|
|
| 04 Apr 2015 04:28 PM |
Here you go!
http://www.roblox.com/Forum/ShowPost.aspx?PostID=159383420 |
|
|
| Report Abuse |
|
|
Celestus
|
  |
| Joined: 15 Aug 2011 |
| Total Posts: 14873 |
|
|
| 04 Apr 2015 04:28 PM |
You will need access to the present year if you are to depict age from birthdate.
Current Year - Birth Year
e.g. 2015-1998 = 17, implies you have passed your birth month though. |
|
|
| Report Abuse |
|
|
|
| 04 Apr 2015 04:33 PM |
"i need to store two variables one is name one is year born and then tell them how old they will be next year"
oops misread that.
You use the thing where you get the current date and you add one to the year.
Thankfully you don't have to do this in god damn Lua, so it's way easier, because other languages handle dates WELL. |
|
|
| Report Abuse |
|
|
Imitater
|
  |
| Joined: 17 Aug 2012 |
| Total Posts: 29994 |
|
|
| 04 Apr 2015 04:33 PM |
im thinking maybe it goes like that
so its asks u year born
num1 = year born (input) num2 = 2015 -- current year num3 = num2 - num1 to get current age
so etc num 1 = 2000 2015 - 2000 = 15 |
|
|
| Report Abuse |
|
|
|
| 04 Apr 2015 04:33 PM |
| I PMed you the link so you can use the Date class. |
|
|
| Report Abuse |
|
|
Celestus
|
  |
| Joined: 15 Aug 2011 |
| Total Posts: 14873 |
|
|
| 04 Apr 2015 04:34 PM |
| Yeah provided you weren't born in a month which is later than the month of the current year. |
|
|
| Report Abuse |
|
|
Imitater
|
  |
| Joined: 17 Aug 2012 |
| Total Posts: 29994 |
|
|
| 04 Apr 2015 04:35 PM |
| ok ill give it 1 more try and see if it works before i crack and pm you delta |
|
|
| Report Abuse |
|
|
|
| 04 Apr 2015 04:36 PM |
i really should do Java again or C today
thank you imitater for inspiring me sir! |
|
|
| Report Abuse |
|
|
Imitater
|
  |
| Joined: 17 Aug 2012 |
| Total Posts: 29994 |
|
|
| 04 Apr 2015 04:45 PM |
| i sent you a pm i should of probably commentated my code well i put where the error was happening |
|
|
| Report Abuse |
|
|