Help wanted with enum

Game Editor comments and discussion.

Help wanted with enum

Postby Jeisenga » Sun Apr 18, 2021 1:25 pm

Hi,

Anybody out there who can help me with ENUM?

I have the following script, and if I understand correctly, I should be able to use ENUM for that, but I can’t figure it out.
The code below works fine but I would like to understand ENUM.
Help is much appreciated.

Code: Select all
stTime t = getTime();
char dag[12];
switch (t.wday)
{
case 0: sprintf (dag, "Zondag"); break;
case 1: sprintf (dag, "Maandag"); break;
case 2: sprintf (dag, "Dinsdag"); break;
case 3: sprintf (dag, "Woensdag"); break;
case 4: sprintf (dag, "Donderdag"); break;
case 5: sprintf (dag, "Vrijdag"); break;
case 6: sprintf (dag, "Zaterdag"); break;
}
sprintf(Datum.text, "%s   %02d-%02d-%04d\n%02d:%02d:%02d", dag, t.mday,t.mon,t.year,t.hour,t.min,t.sec);
Jeisenga
 
Posts: 42
Joined: Sun Sep 23, 2018 7:22 am
Score: 2 Give a positive score

Return to GE - General

Who is online

Users browsing this forum: No registered users and 1 guest