- Jul 19, 2021
- 19
- 4
Hi there, I'm trying to build a time/date system consisting of dayparts, weekdays, weeks and seasons
In my StoryInit :
In my StoryCaption:
and as widget:
this give my the error:
Where is my mistake?
In my StoryInit :
Code:
<<set setup.dayPart = ["Morning", "Late Morning", "Noon","Afternoon", "Evening", "Late Evening", "Late Night","Night"]>>
<<set $gameTime = 0>>
<<set setup.weekPart = ["Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday"]
<<set $gameWeekDay = 0>>
<<set setup.week = ["1", "2", "3", "4", "5", "6", "7", "8", "9", "10", "11", "12"]
<<set $gameWeek = 0>>
<<set setup.season = ["Summer", "Autumn", "Winter", "Spring"]
<<set $gameSeason = 0>>
Code:
<<=setup.dayPart[$gametime]>>
<<=setup.weekPart[$gameWeekDay]>>
<<=setup.week[$gameWeek]>>
<<=setup.season[$gameSeason]>>
Code:
<<widget "TimeModus">>
<<if ++$gameTime >= setup.dayTimes.length>>
<<set
$gameTime = 0,
$gameWeekDay.setDate($gameWeekDay.getDate() +1)
<<if ++$gameWeekDay >= setup.weekPart.length>>
<<set
$gameWeekDay =0,
$gameWeek.setDate($gameWeek.getDate() +1)
<<if ++$gameWeek >= setup.week.length>>
<<set
$gameWeek = 0,
§gameSeason.setDate($gameSeason.getDate() +1)
<<if ++$gameSeason >= setup.season.length>>
<<set
$gameSeason =0,
>>
>>
>>
>>
<</if>>
<</if>>
<</if>>
<</if>>
</widget>>
Where is my mistake?
Last edited: