3 Replies - 816 Views - Last Post: 07 December 2015 - 03:01 PM Rate Topic: -----

#1 sasha2cool   User is offline

  • New D.I.C Head

Reputation: 1
  • View blog
  • Posts: 4
  • Joined: 07-December 15

Python Text-Based Game

Posted 07 December 2015 - 01:07 PM

hello im new to python, im trying to make a text basedgame with python on this site, i dont know what it is to be specific http://blog.trinket....re/#comment-118 .
everything i put in just gets errors even if its just one word changed
like this:
 sidewalk = game.new_location 

thats the original text
 winter-field = game.new_location 

thats when i get an error.. i only change the location and it goes to an error
i even make the endings of the script
[code] player = game.new_player(sidewalk)

This post has been edited by macosxnerd101: 07 December 2015 - 01:25 PM
Reason for edit:: Renamed title to be more descriptive and moved to the main Python forum out of Python Discussion Lounge.


Is This A Good Question/Topic? 0
  • +

Replies To: Python Text-Based Game

#2 andrewsw   User is offline

  • blow up my boots
  • member icon

Reputation: 6549
  • View blog
  • Posts: 26,559
  • Joined: 12-December 12

Re: Python Text-Based Game

Posted 07 December 2015 - 01:27 PM

You should post the error details, but you cannot name a variable using a hyphen (winter-field). This is fundamental knowledge for Python (or any language). If you are not aware of this then you should resume studying Python before attempting that game.

This post has been edited by andrewsw: 07 December 2015 - 01:30 PM

Was This Post Helpful? 1
  • +
  • -

#3 sasha2cool   User is offline

  • New D.I.C Head

Reputation: 1
  • View blog
  • Posts: 4
  • Joined: 07-December 15

Re: Python Text-Based Game

Posted 07 December 2015 - 02:56 PM

i kind of didnt study python i just found something that said python was easy... so i gave it a try...
so there kind of was no studying involved i wanted to make a text based game so i tried this thing found that uses python to try it
Was This Post Helpful? 0
  • +
  • -

#4 macosxnerd101   User is offline

  • Games, Graphs, and Auctions
  • member icon




Reputation: 12315
  • View blog
  • Posts: 45,414
  • Joined: 27-December 08

Re: Python Text-Based Game

Posted 07 December 2015 - 03:01 PM

You're not the first person to do this and you won't be the last. But your approach isn't a good one for learning. Take the time to learn the basics and practice with more appropriate exercises. That way, when you are mature enough to write a text based game, you can be the one making the decisions rather than some half-baked tutorial. ;)
Was This Post Helpful? 1
  • +
  • -

Page 1 of 1