Python Forum
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
issues with name color?
#1
hey! im using renpy if anyones familiar with it to code my game, and i typed in this thread: define m = Character("Mothman”, color=“#3e2a54”). i keep getting the error I'm sorry, but errors were detected in your script. Please correct the
errors listed below, and try again.


File "game/script.rpy", line 6: is not terminated with a newline. (Check strings and parenthesis.)
(Perhaps you left out a " at the end of the first line.)
define m = Character("Mothman”, color=“#3e2a54”)

What is the issues? Please help!
Reply
#2
can you post let's say top 10 lines of your code (assuming this is line#6 as per the traceback)? Also check the line before that one...
Reply
#3
(Jan-17-2018, 06:49 PM)buran Wrote: can you post let's say top 10 lines of your code (assuming this is line#6 as per the traceback)? Also check the line before that one...
the lines above it are simply comments renpy leaves there by default, but here:
# The script of the game goes in this file.

# Declare characters used by this game. The color argument colorizes the
# name of the character.

define m = Character("Mothman”, color=“#3e2a54”)

define b = Character("Bigfoot”, color=“#856864”)

define n = Character("Nessie”, color=“#2f7e68”)

# The game starts here.

label start:
Reply
#4
The quotes look like curly quotes or slanded quotes. Rewrite them all by hand. Did you copy and paste the code from a pdf file or rich text file? What is your editor?
Reply
#5
Are you using Word as your text editor? Those aren't quote characters, and python won't understand them.
Reply
#6
it should look like this

define m = Character("Mothman", who_color=[ ("#3e2a54") ])
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  Turtle Star Fill Color Yellow-White Interchanging Color Effect codelab 9 1,077 Oct-25-2023, 09:09 AM
Last Post: codelab

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020