I have no idea...

Discuss how to use the Ren'Py engine to create visual novels and story-based games. New releases are announced in this section.
Forum rules
This is the right place for Ren'Py help. Please ask one question per thread, use a descriptive subject like 'NotFound error in option.rpy' , and include all the relevant information - especially any relevant code and traceback messages. Use the code tag to format scripts.
Post Reply
Message
Author
User avatar
Aniknk
Regular
Posts: 30
Joined: Fri May 24, 2019 10:57 am
Contact:

I have no idea...

#1 Post by Aniknk »

...what I've done wrong here:

Code: Select all

    label DayProceed:
        jump DayProceed2
        $ GameRunning = True
        while GameRunning:
            "Skip hour"
            $ Calendar.AddTime(1)

        return

    label DayProceed2:
        $ Calendar = Calendar(0, 0, 0, 0, ["January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December"], 0, ["Monday", "Tuesday", "Wensday", "Thursday", "Friday", "Saturday", "Sunday"], [31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31])

        return
Or here:

Code: Select all

    init python:
        class Calendar(object):
            def __init__(self, Hours, Hour, Days, Day, Months, Month, WeekDays, MonthDays):
                self.Hours = Hours
                self.Hour = Hour
                self.Days = Days
                self.Day = Day
                self.Months = Months
                self.Month = Month
                self.WeekDays = WeekDays
                self.MonthDays = MonthDays

            @property
            def Output(self):
                return self.WeekDays[self.Day] + " " + self.Months[self.Month] + " " + str(self.Days+1) + " " + str(self.Hours).zfill(2) + ":00"

            def AddTime(self, Hours):
                self.Hours += Hours
                if self.Hours > 23:
                    self.Hours -= 24
                    self.Day += 1
                    self.Days += 1
                if self.Day > 6:
                    self.Day = 0
                if self.Days > self.MonthDays [self.Month]:
                    self.Month += 1
                    self.Day = 0
                if self.Months > 11:
                    self.Month = 0
I swear it was working an hour ago.
I wish I had an talent to do graphics. Or any other talents. But you know what they talking about people without any talents, they have a big pe***es. No wait. They talk so about people with big feets...

User avatar
deltadidirac
Regular
Posts: 123
Joined: Fri Nov 30, 2018 5:00 am
Projects: Artworks and Comics
Tumblr: deltadidirac
Deviantart: Deltadidirac67
Location: Europe
Contact:

Re: I have no idea...

#2 Post by deltadidirac »

Aniknk wrote: Sat Nov 09, 2019 7:09 am ...what I've done wrong here:

Code: Select all

    label DayProceed:
        jump DayProceed2
        $ GameRunning = True
        while GameRunning:
            "Skip hour"
            $ Calendar.AddTime(1)

        return

    label DayProceed2:
        $ Calendar = Calendar(0, 0, 0, 0, ["January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December"], 0, ["Monday", "Tuesday", "Wensday", "Thursday", "Friday", "Saturday", "Sunday"], [31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31])

        return
Or here:

Code: Select all

    init python:
        class Calendar(object):
            def __init__(self, Hours, Hour, Days, Day, Months, Month, WeekDays, MonthDays):
                self.Hours = Hours
                self.Hour = Hour
                self.Days = Days
                self.Day = Day
                self.Months = Months
                self.Month = Month
                self.WeekDays = WeekDays
                self.MonthDays = MonthDays

            @property
            def Output(self):
                return self.WeekDays[self.Day] + " " + self.Months[self.Month] + " " + str(self.Days+1) + " " + str(self.Hours).zfill(2) + ":00"

            def AddTime(self, Hours):
                self.Hours += Hours
                if self.Hours > 23:
                    self.Hours -= 24
                    self.Day += 1
                    self.Days += 1
                if self.Day > 6:
                    self.Day = 0
                if self.Days > self.MonthDays [self.Month]:
                    self.Month += 1
                    self.Day = 0
                if self.Months > 11:
                    self.Month = 0
I swear it was working an hour ago.
Hi,
I'm not good, and I can't give you a suggest for the second part (the init definition), but I think that for sure something is wrong with the first labels part...

Code: Select all

    label DayProceed:
        jump DayProceed2                                   ###############   here I think it's the wrong place to write jump (this would be the final command)
        $ GameRunning = True
        while GameRunning:
            "Skip hour"
            $ Calendar.AddTime(1)

        return                                                   ##############     here or you jump, or you return.....

    label DayProceed2:
        $ Calendar = Calendar(0, 0, 0, 0, ["January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December"], 0, ["Monday", "Tuesday", "Wensday", "Thursday", "Friday", "Saturday", "Sunday"], [31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31])

        return
I hope this could help you

User avatar
Aniknk
Regular
Posts: 30
Joined: Fri May 24, 2019 10:57 am
Contact:

Re: I have no idea...

#3 Post by Aniknk »

Thanks, but it's not this. I have to think about easier way to add time skip. Any sugestions?
I wish I had an talent to do graphics. Or any other talents. But you know what they talking about people without any talents, they have a big pe***es. No wait. They talk so about people with big feets...

User avatar
Aniknk
Regular
Posts: 30
Joined: Fri May 24, 2019 10:57 am
Contact:

Re: I have no idea...

#4 Post by Aniknk »

I've repaired it. It should be call not jump. And on top after all.
I wish I had an talent to do graphics. Or any other talents. But you know what they talking about people without any talents, they have a big pe***es. No wait. They talk so about people with big feets...

User avatar
deltadidirac
Regular
Posts: 123
Joined: Fri Nov 30, 2018 5:00 am
Projects: Artworks and Comics
Tumblr: deltadidirac
Deviantart: Deltadidirac67
Location: Europe
Contact:

Re: I have no idea...

#5 Post by deltadidirac »

Aniknk wrote: Sat Nov 09, 2019 8:39 am Thanks, but it's not this. I have to think about easier way to add time skip. Any sugestions?
Do you mean something like a cheat?
pressing you a button the time go forward and you jump 1 more hour or 1 more day?

User avatar
Aniknk
Regular
Posts: 30
Joined: Fri May 24, 2019 10:57 am
Contact:

Re: I have no idea...

#6 Post by Aniknk »

I already resolve this problem, but something new happend:
After I leaving time skip, and go there back, and press button, it kick me out of game. Really if there is a easier way to add visable Calendar to game, please tell me.
I wish I had an talent to do graphics. Or any other talents. But you know what they talking about people without any talents, they have a big pe***es. No wait. They talk so about people with big feets...

User avatar
deltadidirac
Regular
Posts: 123
Joined: Fri Nov 30, 2018 5:00 am
Projects: Artworks and Comics
Tumblr: deltadidirac
Deviantart: Deltadidirac67
Location: Europe
Contact:

Re: I have no idea...

#7 Post by deltadidirac »

Aniknk wrote: Sat Nov 09, 2019 9:16 am I already resolve this problem, but something new happend:
After I leaving time skip, and go there back, and press button, it kick me out of game. Really if there is a easier way to add visable Calendar to game, please tell me.
To help you with YOUR code already wrote, I would read it all before , and I'm not the better person here that could be do it because I'm not a programmer; but if the game kick out you (I think you mean that you come back to the main_menu), probably there is some where in one label a "return" command that it could not be there; or you did some mistake with some jump command

The problem could be find also in some screen in witch you didn't wrote correctly all the Hide and Show an Jump sequences...

Generally are things like that often give you problems (I'm talking about myself), when happen, I sotp some minutes, I drink a coffe, and after I re-read all the code step by step doing the scheme on a peper with a pencil, to be sure to have done all correctly.
You could also copy a system already done by another person, perhaps here you can find something:
viewtopic.php?f=51&t=34131

User avatar
Aniknk
Regular
Posts: 30
Joined: Fri May 24, 2019 10:57 am
Contact:

Re: I have no idea...

#8 Post by Aniknk »

Hey, thank you! It's very usefull!
I wish I had an talent to do graphics. Or any other talents. But you know what they talking about people without any talents, they have a big pe***es. No wait. They talk so about people with big feets...

Post Reply

Who is online

Users browsing this forum: Ahrefs [Bot]