Raze
@Rocking-Rayquaza
"A dream is not that which you see while sleeping, it is something that does not let you sleep."- A.P.J Abdul Kalam
How do I upgrade my Python 3.8.x to 3.9.x? Or should I even do that?
I am making a game so I want a save feature that if the user leave the game in between and comes back again he can start from that particular place it
crunchyfrog32 I don't know about saving user data to their account/local storage in CLI programs (neither can you access the client IP address with Repl.it), but what you can do is making save codes that users can copy to get into a certain game state.2 years ago
i am working on a discord bot recently my onmemberjoin event is not working idk why, I think it i because of the update in discord.py!and introduction
PattanAhmed Welcome to the Repl.it Talk Sections again as you were not active for so long
:D2 years ago
A Bot in Discord.py That can do google search!!
Knowledge multiplies when shared!
So without any further ado let's get started!
Installing Packages
EsloBLM hi i can't quite figure out how im supposed to call the event in discord i have tried !find or just find but it doesnt work7 months ago
OtsoBear i used the tutorial and have a bot but i cant figure out how to use it. i have my command_prefix as "!" and i have copied the code in the description. for example: !Find or !find or !Find apple or !find apple do not work.7 months ago
HI THERE!
> How to add multiple values to a single key in repl.it database in python
> How to view your repl.it database
> In python!
Regard,
Rayq
Coder100 3 questions?!?
Ok...
import db
multiple values
db["my-val"] = ("list", "so", "cool", "right?!?", "more than one value!")
for key in db:
print(key, ":", key["db"], ",")
`2 years ago
Spacecraft I don't think this is possible. You can assign one value to one key. But, there's nothing that prevents you from entering multiple entries into one key value, like this:
mykey = value1, value2, value3, value4
You would need to split the value string up by commas after reading it, but it could work for you depending on your specific application.2 years ago
Hello there repl.it community!
can you help me setting up firebase?
It will be good if you can include screenshot
Do include all necessary additions
P
I have been working on a bot a few days back.
So to make that bot available in other servers do I need to manage a database. If yes then which db woul
Coder100 It really depends, if you want the bot configuration to be unique for each user, you need a database. Otherwise, if it's general purpose, no database is needed!
https://firebase.google.com
https://mongodb.com
are good ones.2 years ago
I am currently woking with a text game but it's really loong so is there a way to make a save feature so that user can save the game in between and co
PattanAhmed @ROCKINGRAYQUAZA Hi,
I think these websites might help you:-
**Click here
Click here**
Comment me, if this helps you...
Hope this helps2 years ago
SamKunefeh I am also working on a text based adventure game and just literally posted a question right now. You can view it here: https://repl.it/talk/ask/Database-For-Text-Game/51218
* Here's some suggestions: *
You can save the player's data on a database like sqlite3 or mongodb.
You can make a json file for all the accounts.
You can use python's module pickle with import pickle and use it to pickle the player's data and load it when player starts the game. You can read the documentation online, as it's2 years ago
Please check my function is not working correctly + i have made a dictionary for storing level values of pokemon captured but it is throwing an error
Python
Codejira local variable 'pokelev' referenced before assignment means that Python tries to get its value, but there's none assigned yet.
In fact the only place pokelev gets a value assigned is inside the code block of if wild_bat =="4":
Assign something to pokelev for all the values of wild_bat, or initialize it with a default value at the top of the function.
The error occurs when you try to print(pokelev). But it's a dictionary, so I'm not sure if you really want to do so. Often it's rather print(pok2 years ago
I just want the content of the list to be printed one time with their serial number but i don't know why the program is doing like this??
PattanAhmed @ROCKINGRAYQUAZA Hi,
You haven't exited the code, Just add break at the first for loop and you are done...
Code:-
your_team = ['Charmander','Pidgey','Pikachu']
for j in range(1,len(your_team)):
for i in your_team:
print(str(j)+". "+str(i))
j+=1
if i == len(your_team):
break
else:
continue
break
Thanks!
Hope this helps2 years ago
Hey there everybody hope you are having a great day
>Thanks for your great support on my Rayquaza-Rise [Part-1]
>Now stay tuned as [Part-2] work is un
Python
NoNameByProgram 1, [ERROR]. list is already a variable in Python.
2, [IMPROVEMENT]. os.system("clear") can be a function.
3, [IMPORVEMENT]. time.sleep can be sleep, if you do: from time import sleep.2 years ago
It is here everybody..
POKEMON RAYQUAZA RISE
MY FIRST BIG PROJECT :)
Please everyone try this out and tell us about your experience in the comments..
Python
PattanAhmed @ROCKINGRAYQUAZA Hi,
Sorry to say...
I am seeing this post now! :(
> I am happy that you got help from me a lot.
Anyways, your game is amazing. Love it bro.
Keep it up!
Thanks!2 years ago
please check this out
File "main.py", line 65
os.system("clear")
^
IndentationError: unindent does not match any outer inde
Python
PattanAhmed @ROCKINGRAYQUAZA Hi,
Make your code like this:-
a = input(">>>")
a = a.upper()
if a == "Y":
os.system("clear")
message2 = (
bright_cyan +
"You:[WAKING UP]where am I?\n\nHow did I get here inside this dark cave...\n\nWhere is my family,Where am I?\nUhh! I can hear someone.\nHELP!\n\nHELP!\nSOMEONE HELP ME\n\n"
red +
"[After a while searching the cave you find some wierd people wearing black cape..]"
bright_cyan +
"\n\nYou were curious about them so you went near 2 years ago
Coder100 Another way to do it (much easier and faster), is to do a search because the error is that the code you copied contained a tab and not a space:
image
oh hey look there are more errors actually
image
Click the triangle, and then inside the second input, type in (2 spaces)
image
Click that^^2 years ago
image
the highlighted portion is not excepted by the the computer Idk why?
maybe there are some syntax issue but I don't know please help me
WHICH OF
Python
Spacecraft Your code is a bit confusing, but I think I see the issue. Line 158 and 159 set fp to '1'. Then, line 167 sets fp to c, which evaluates to "Charmander" from line 161.
From there, your immediate problem is that you didn't capitalize Charmander in your IF statement, causing them to never match:
if fp == "1" or fp == "charmander":
typewriter(blue + str(rival)+" obtained a "+ str(s)+"\n")
rfp = s
`2 years ago
Hey there!Everyone hope you are having a good day
Now, i am updating ths post as due to some help from @Coder100 and @Codejira and due to some of my o
Python
Codejira Before choosing a nickname, assign fp2 = fp. I suggest line 184.
Line 193 can be deleted then.
This is not tested, but I think it should do the trick.
2 years ago
Codejira You have to change some if conditions.
Where you wrote if fp==("1" or "Charmander"): I believe if fp == "1" or fp == "Charmander": is what you want.
In your if elif block on lines 192 - 200 the conditions never evaluate to True. That's why rfp never gets a value assigned, resulting in the NameError: name 'rfp' is not defined a little later.
Also pay attention to capitalization: "Charmander" and "charmander" are two different strings and "Charmander" == "charmander" evaluates to `False'.2 years ago
Hey there ! everyone get ready for another question .whenever i am running this program its throwing an error on me I don't know why that's happening.
Python
VulcanWM Instead of if fp == (1 or "charmander"):, you should do if fp == ("1" or "charmander"):, because right now, whenever you enter a number, it is a string, not an integer. And the string number 1 is not in any of those if statements, so the variable confrm doesn't define (you didn't give it a thing to do).2 years ago
I am using random module i a list and make a sentence but whenever i am running it ,it is showing the word surrounded with brackets but i don't what i
ironblockhd Print wildpoke[0] instead of wildpoke
You can mark this reply as correct if it helped2 years ago
get ready for another pokemon rayquaza rise question run the repl ..i have commented all the extra part for your convenience ..Why is it giving none a
Python
Spacecraft I'm not certain why, but your typewriter function combined with input() is adding an empty value to the end of your statement. You could write it like this to get around the problem:
typewriter(green+"WHICH OF THE FOLLOWING YOU WANT TO CHOOSE:\n1)Charmander\n2)Bulbasaur\n3)Squirtle\nEnter the number:")
fp = input()
fp = fp.lower()
2 years ago
i don't know other as i haven't met all of you but @Coder100 and @CodingCactus both of you have helped me various times.I just wanna ask you both that
Coder100 Hi!! I learned most of my knowledge by doing things. There is no failproof way to learn everything, but by trying to do everything, you can come close. https://w3schools.com and https://developer.mozilla.org/en-US/ will help you to learn new things, and https://stackoverflow.com (and repl.it!) will be useful for you to ask questions.2 years ago
PattanAhmed @ROCKINGRAYQUAZA Hi,
I just learn coding on free sources and try to implement them in my own projects...
I started with these two courses which are really beginner-friendly!
Click here
and this
Click here
And I started building my own projects and try to implement those things
I get sucked many times and I will try myself to come over it...
You too, do the same...
When you get into errors, Check how to solve them in google or in YouTube videos or ask it here in the Repl.it Ask Section
Thanks.
2 years ago
comment or suggest something about the game if you have anything in mind..
Python
ShivanshMishra Yes i am Shivansh Mishra. Do you know me? Or you have sent me the mail by mistake?2 years ago
ShivanshMishra Hey, I am new to this platform. You recently sent me an invitation to edit the code or something like that.
I had few questions to ask, so plz consider answering these questions.
How you got to know about me and what's the purpose behind sending me the mail. I am not experiencend in coding as i started about 6 months ago.
How things work here? Is this a team? Can everyone collaborate here?
Sorry for posting this question as i dont know how i can communicate with you, outside of this post secti2 years ago