Search found 7 matches

by MrTorex
Sat Jan 26, 2019 11:47 am
Forum: Ren'Py Questions and Announcements
Topic: [SOLVED].lower() function error
Replies: 11
Views: 696

Re: .lower() function error

IrinaLazareva wrote:
Sat Jan 26, 2019 10:53 am
try

Code: Select all

label start:
    '?'
    python:
        import os
        user = '%s' % os.environ.get('username')
        user = user.lower()
    '[user]'
    return
OH MY IT WORKS.
Thank you!
by MrTorex
Sat Jan 26, 2019 10:21 am
Forum: Ren'Py Questions and Announcements
Topic: [SOLVED].lower() function error
Replies: 11
Views: 696

Re: .lower() function error

just grabbed some random advice from internets let's see if it work label start: python: import os name = renpy.input("Как вас зовут?") #ENG: "What is your name?" name = name.strip() or ("NONAME") namel = name.lower() nameu = name.upper() user = os.environ.get('username') userl = user.lower() useru...
by MrTorex
Sat Jan 26, 2019 7:47 am
Forum: Ren'Py Questions and Announcements
Topic: [SOLVED].lower() function error
Replies: 11
Views: 696

Re: .lower() function error

really confused on this issue, because both mine and Imperf3kt's code do work in my case. don't you mind for some sanity checks? what is your os? what is your renpy version? there is a project with Imperf3kt's code implementation attached in a zip file below. can you run it? how does it wurk? No re...
by MrTorex
Fri Jan 25, 2019 8:09 am
Forum: Ren'Py Questions and Announcements
Topic: [SOLVED].lower() function error
Replies: 11
Views: 696

Re: .lower() function error

I use the following code to assign the windows login name with a variable. You could use the same and then compare the input name, with the name this code reports? init python: if os.name == 'nt': import os for name in ('LOGNAME', 'USER', 'LNAME', 'USERNAME'): player = os.environ.get(name) elif os....
by MrTorex
Fri Jan 25, 2019 6:27 am
Forum: Ren'Py Questions and Announcements
Topic: [SOLVED].lower() function error
Replies: 11
Views: 696

Re: .lower() function error

Lena_Borodach wrote:
Fri Jan 25, 2019 6:22 am
you need

Code: Select all

        import os
        import pwd
        user = pwd.getpwuid( os.getuid() )[ 0 ]
instead of

Code: Select all

    import os
    user = os.environ.get('username')

Code: Select all

	IMPORT ERROR:
	No module named pwd
by MrTorex
Fri Jan 25, 2019 5:45 am
Forum: Ren'Py Questions and Announcements
Topic: [SOLVED].lower() function error
Replies: 11
Views: 696

[SOLVED].lower() function error

Hello everyone! I'm new in Ren'py and in Python too. I have a question. I wrote a function in code that is responsible for viewing a Windows username. To check whether the username is the same with the name that the player enters at the beginning of the game, I created new variables that are equal t...
by MrTorex
Fri Jan 25, 2019 5:07 am
Forum: Ren'Py Questions and Announcements
Topic: Menu error
Replies: 5
Views: 422

Re: Menu error

Can you show the part of the code where the scope is? Because i don't see it in your code.