Skip to content
Sign upLog in
Profile icon

coolplayer stojakovic

@parsec00
Repls
Community
parsec00
parsec00
published a Repl
4 months ago
0
Lua C API Test
Lua C API TestDemonstrates Lua's C API by creating a global table with the C API and calling a C function from Lua. If you wish to replicate this, you must create a blank REPL and add gcc and lua as dependencies in your replit.nix file.
parsec00
parsec00
published an Update
7 months ago
0
getkey
getkeyDetect keypresses in C++
Keypress detection in C/C++
We've all seen repls that make use of Python's getkey module to detect keypresses, most commonly to create controls for text-based games. But what if you're like me and prefer making text-based games (and shooting yourself in the foot in the process) with C++ instead of Python? After all, C++ is way faster than Python. The only problem with this is that keypress detection similar to Python's getkey is a little less obvious to implement, since C++ doesn't offer a module like this built in. However, it does offer a header file that allows you to implement this rather easily: termios.h. termios.h is a header file that allows you to programmatically change settings in the terminal (in POSIX systems, at least) by creating termios structs that contain terminal settings. You can copy, apply, and modify these using the tcsetattr and tcgetattr functions. I won't go into these too in depth, if you really want to figure out how termios.h works in this repl, fork it or view the getkey.h header file. Thank you for reading this post, I hope you learned something!
#cpp
parsec00
parsec00
shared a Post
2 years ago
Hi, I'm trying to host a Discord bot using discordrb, but whenever I try to require discordrb, it gives an error about the file not being found, when
PattanAhmed
PattanAhmed
@coolplayerstoja Hi, You are not receiving full permissions to do that. If you are really interested in that you can feel free to report it in the Bugs Section You can go to Bugs Section from here The community of Repl.it may follow up with you there! *Hope this helps Please mark my answer if this helps*2 years ago
Coder100
Coder100
Basically what's going on is that you are missing permissions to do it. You should report this to bugs.2 years ago
parsec00
parsec00
shared a Post
3 years ago
Since I had some free time, I made this little project with Python. It's a game of hangman that doesn't want you to win. The first few lines should be
Impossible Hangman
Python