LINT Issue (7.1)

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
Bruni Multimedia
Regular
Posts: 67
Joined: Mon May 15, 2017 12:23 pm
Projects: General Practitioner
Organization: Bruni Multimedia
itch: brunimultimedia
Contact:

LINT Issue (7.1)

#1 Post by Bruni Multimedia » Fri Sep 21, 2018 8:11 am

Hi.
Since I updated ren'py I'm having an issue using lint.

Each time I launch it it says that "I forgot to define a character" and lists me all "Cannot evaluate 'm' as character..." for every file in my game and every dialogue.

The game works fine, so it recognizes characters and such, the issue seem to revolve around lint only...

User avatar
Meg'
Regular
Posts: 175
Joined: Tue Sep 27, 2011 10:37 am
Projects: Anges Démoniaques, Gang
Location: France
Contact:

Re: LINT Issue (7.1)

#2 Post by Meg' » Fri Sep 21, 2018 11:29 am

Did you declare "m"?

Code: Select all

define m = Character("Eileen",
                     who_color="#c8ffc8")
My guess is that you forgot to define "m", this is why ren'py doesn't recognize it.
Image

User avatar
Imperf3kt
Eileen-Class Veteran
Posts: 1955
Joined: Mon Dec 14, 2015 5:05 am
Location: Your monitor
Contact:

Re: LINT Issue (7.1)

#3 Post by Imperf3kt » Sat Sep 22, 2018 4:10 am

Lint isn't renpy. If the game runs, "m" must be defined, else renpy would throw an exception.

My guess is you"ve misplaced a " somewhere.

Personally, I do not recommend using single characters as variables or character calls.
Warning: May contain trace amounts of gratuitous plot.
pro·gram·mer (noun) An organism capable of converting caffeine into code.

User avatar
Bruni Multimedia
Regular
Posts: 67
Joined: Mon May 15, 2017 12:23 pm
Projects: General Practitioner
Organization: Bruni Multimedia
itch: brunimultimedia
Contact:

Re: LINT Issue (7.1)

#4 Post by Bruni Multimedia » Sat Sep 22, 2018 4:48 am

"m" is defined.
Lint tells me EVERY character is missing. Not only "m" but also "Chr", "EB", "RM" etc. etc. Every single one.

Which is unfortunate but immaterial, since they are defined like they always have been and this is the first time I get the error.
Also, the game works, so it recognizes the definition or else it would crash right at the beginning... :(

User avatar
Remix
Eileen-Class Veteran
Posts: 1022
Joined: Tue May 30, 2017 6:10 am
Completed: None... yet (as I'm still looking for an artist)
Projects: An un-named anime based trainer game
Contact:

Re: LINT Issue (7.1)

#5 Post by Remix » Sat Sep 22, 2018 9:21 am

Perhaps you could post some code showing how you define your characters (including a previous block so we can see if they are nested inside anything)
Mad Scientist Todo List:
  • Finish Improved Event Handler
  • Implement DragonBones animation as a Creator Defined Container
  • Finish Catmull-Rom Spline pathing
  • Finish Bitmask collision and rebound vector system
  • Develop time based building mechanic
  • Others
  • *Find a superb artist and actually write a game*

User avatar
Bruni Multimedia
Regular
Posts: 67
Joined: Mon May 15, 2017 12:23 pm
Projects: General Practitioner
Organization: Bruni Multimedia
itch: brunimultimedia
Contact:

Re: LINT Issue (7.1)

#6 Post by Bruni Multimedia » Thu Sep 27, 2018 3:35 am

Code: Select all

init python:
    energy = 100
    knowledge = 10
    charm = 5
    fitness = 5
    integrity = 100
    sexperience = 20
    fame = 0
    def ptlimit():
        if store.energy < 0:
            store.energy = 0
        elif store.energy > 100:
            store.energy = 100

        if store.knowledge < 0:
            store.knowledge = 0
        elif store.knowledge > 110:
            store.knowledge = 110

        if store.charm < 0:
            store.charm = 0
        elif store.charm > 110:
            store.charm = 110

        if store.fitness < 0:
            store.fitness = 0
        elif store.fitness > 110:
            store.fitness = 110

        if store.sexperience < 0:
            store.sexperience = 0
        elif store.sexperience > 110:
            store.sexperience = 110

        if store.fame < 0:
            store.fame = 0
        elif store.fame > 110:
            store.fame = 110

    config.python_callbacks.append(ptlimit)

    if persistent.lang is None:
        persistent.lang = "english"

    build.classify('**.png', 'archive')
    build.classify('**.jpg', 'archive')
    build.classify('**.rpy', 'archive')
#    build.classify('**.rpyc', 'archive')
    build.classify('**.mp3', 'archive')
    build.classify('**.ttf', 'archive')
    build.classify('**.ogg', 'archive')
    build.classify('**.ogv', 'archive')
    build.classify('**.rpy', None)

    class getMousePosition(renpy.Displayable):

        def __init__(self):
            renpy.Displayable.__init__(self)

        def event(self, ev, x, y, st):
            import pygame

            if ev.type == pygame.MOUSEMOTION: # Updates the position of the mouse every time the player moves it
                store.mousex = x
                store.mousey = y

        def render(self, width, height, st, at):
            return renpy.Render(1, 1)

    store.mousePosition= getMousePosition()

    def checkEvent():
        ui.add(mousePosition)
    config.overlay_functions.append(checkEvent) # This adds a 1*1 displayable on every screen

    build.archive("scripts", "scr")
    build.archive("images", "img")
    showmoney = False
    def display_money():
        if showmoney and 1==2:
            ui.frame()
            ui.text("Money: $ %d" %denaro_totale)
    config.overlay_functions.append(display_money)

    import webbrowser

    dp_period("Morning", "morning_act")
    dp_choice("Hospital", "hospital", show="(dow==2 or dow == 4) and ev_hospital == 1 and staff_hired>1 and festival_day == False")
    dp_choice("Date", "study", show = "date==1 and festival_day == False")

default u = "???" #personaggio sconosciuto
default c = "???" #personaggio generico
default mom = "Mom"
default flash = Fade(.25, 0, .75, color="#fff")

#DOTTORE - PERSONAGGIO PRINCIPALE
default m = Character('Me', color="#666666", image="dottore")
default dottore = Character('Me', color="#666666", image="dottore")
image side dottore ="sides/side_dottore.png"
image dottore = "Chars/dottore_normale.png"
image dottore felice = "Chars/doctor_happy.png"
image dottore contento = "Chars/doctor_happy.png"
image dottore triste = "Chars/dottore_normale.png"
image dottore preoccupato = "Chars/dottore_normale.png"
image dottore imbarazzato = "Chars/doctor_confused.png"
image dottore flirtante = "Chars/doctor_flirty.png"
image dottore arrabbiato = "Chars/doctor_angry.png"
default e = Character('Erika', color="#00ace6", image="erika")

Post Reply

Who is online

Users browsing this forum: majike