123456789101112131415161718 |
- # npc_age
- currnpc_year = mid(npc_dob[$ARGS[0]], 1, 4)
- currnpc_month = mid(npc_dob[$ARGS[0]], 5, 2)
- currnpc_day = mid(npc_dob[$ARGS[0]], 7, 2)
- currnpc_age = year - currnpc_year
- if currnpc_month < month:
- currnpc_age -= 1
- elseif currnpc_month = month and currnpc_day < day:
- currnpc_age -= 1
- end
- RESULT = currnpc_age
- killvar 'currnpc_year'
- killvar 'currnpc_month'
- killvar 'currnpc_day'
- killvar 'currnpc_age'
- --- npc_age -----------------
|