- Jun 3, 2017
- 128
- 59
hello hello
So here a big noob, yes me !
I'm very bad at coding so to search a solution.... Why don't using an AI to try some code.... Well my bad, code don't work lol !
the screen don't show in game and it's just this code in a new "project" for testing.
So what the AI did wrong ? (AI chat, a free AI)
Renpy 8.1 and coding with visual studio code
code in script and screen in my screen
in game ; Exception: Unknow text tag (current_date.strftime('%A, %B %d, %Y %H:%M') (%d in blue color don't know why, the rest in orange)
So here a big noob, yes me !
I'm very bad at coding so to search a solution.... Why don't using an AI to try some code.... Well my bad, code don't work lol !
the screen don't show in game and it's just this code in a new "project" for testing.
So what the AI did wrong ? (AI chat, a free AI)
Renpy 8.1 and coding with visual studio code
code in script and screen in my screen
in game ; Exception: Unknow text tag (current_date.strftime('%A, %B %d, %Y %H:%M') (%d in blue color don't know why, the rest in orange)
Python:
define m = Character('MC', color="#c8ffc8")
init python:
import datetime
current_date = datetime.datetime(2024, 1, 1, 9, 0)
time_delta = datetime.timedelta(minutes=1)
class AdvanceTime(Action):
def __call__(self):
global current_date
current_date += time_delta
renpy.notify("Time advanced to {}".format(current_date.strftime('%H:%M')))
class AdvanceDate(Action):
def __call__(self):
global current_date
current_date += datetime.timedelta(days=1)
renpy.notify("Date advanced to {}".format(current_date.strftime('%A, %B %d, %Y %H:%M')))
$ renpy.repeat(1.0, AdvanceTime)
# Le jeu commence ici
label start:
m"bla bla bla"
m"bla bla bla"
m"Is the screen work ?"
show screen time_screen
menu:
"screen work":
mc"yeahhh"
"screen don't work":
mc"What the f*ck that IA gived to me ? ARGGGGGGHHHHHH"
return
screen time_screen:
text "{current_date.strftime('%A, %B %d, %Y %H:%M')}"
textbutton "Advance Time" action AdvanceTime()
textbutton "Advance Date" action AdvanceDate()