Do you think I could just leave this part blank and it'd be okay? We're just going to replace the whole thing with a header image anyway, right?
You are not logged in.
Just leaving a question,
If I fill the world using my bot. My bot doesn't pick up any commands until it finished filling up the world.
Is this perfectly natural or is there a magic trick to avoid it?
There is a magic trick, involving threading.
Put your fill code into its own method, and then run it in a new thread. No spoonfeeding from me.
One bot to rule them all, one bot to find them. One bot to bring them all... and with this cliché blind them.
Offline
There is a magic trick, involving threading.
Put your fill code into its own method, and then run it in a new thread. No spoonfeeding from me.
Sadly, even putting my own code into it's own void didn't work.
Thanks to: Ernesdo (Current Avatar), Zoey2070 (Signature)
Very inactive, maybe in the future, idk.
Offline
Sadly, even putting my own code into it's own void didn't work.
I can help you if you want. Just PM me
Btw I am not the person to straight out fix it for you because this will result in you not understanding it.
Ingame: marten22 My steam: MartenM
Offline
There's so many things missing or misinforming in this tutorial that I can't even begin to list them.
Firstly, this teaches new botters to use a console, which [opinion] has huge disadvantages over Windows Forms in terms of the code required, especially in operations such as inputting information and triggering bot actions [/opinion]. Please add a winforms tutorial and compare it to console so the user can decide which to use - which they can't, because you've only used console code.
You stress that only a small amount of C# knowledge is required (without linking any external C# tutorials), then display a coded class and dictionary that the user is bound to find confusing with only a little bit of knowledge. Why even put a class with one string in it into a dictionary? - so that other variables can be added in future, but you don't explain that, or list the alternative <int, string> for users who don't need a player class.
You don't explain namespaces, your connect code, what a switch does, what += does for OnMessage, why you send "init" or "init2", what's being added to the dictionary in "add", what PlayerIO is, why you need the dll, what the "Client" and "Connection" variables are for, what "Thread.Sleep" is and why you need it in the connect code (you don't), and you've barely even touched on what a PlayerIOClient message actually is.
You pack all your connect code into two lines, with no error callback checking whatsoever, and with two ternary operators you're pretty much asking to be copy/pasted. There's a danger with every coding tutorial of it establishing its contents as THE one way to do things, but you've gone past that and written:
Let's make sure you have all the code correct in your bot.
And displayed all the code again to be copied. As Humvee said:
I've said it multiple times: my concern with copy and paste is that most prospective "learners" do not understand what they're facing. They then become reliant on someone else's copy/paste code.
This tutorial isn't a good learning tool because you've explained very little of the code and underlying bot theory, and so it's unlikely that a newbie botter will be able to confidently add more code to the core bot they get after following the tutorial.
There aren't enough features in a beginner bot that require use of the basic C# (variables, methods, loops, conditional logic, arrays, lists etc.) necessary to build up a general understanding of the language. You have to stress that C# and bot coding are separate things that should be learned in the correct order.
[/rant]
I'm not quite entirely butthurt, because the bot you end up with will run, but this tutorial goes about things the wrong way. Credits to you for trying, but it's naïve at best to hope to fit an entire bot tutorial into a forum post, and no tutorial can be well-rounded without contribution from multiple people. What would be better is to start a new bot-coding wiki to which multiple coders can add their own explanations and versions of code to topics, and where everything is split up into its own little section with theory first and code second.
You need to add links to other bot tutorials on this forum (like Jaba's) and to beginner C# tutorials (like Homeandlearn). Also introduce StackOverflow and MSDN's C# documentation.
One bot to rule them all, one bot to find them. One bot to bring them all... and with this cliché blind them.
Offline
two ternary operators you're pretty much asking to be copy/pasted.
Probably were to begin with, to be honest...
https://forums.everybodyedits.com/viewt … p?id=26179
Offline
Btw I am not the person to straight out fix it for you because this will result in you not understanding it.
I can't even understand my codes... a bit.
Thanks to: Ernesdo (Current Avatar), Zoey2070 (Signature)
Very inactive, maybe in the future, idk.
Offline
MartenM wrote:Btw I am not the person to straight out fix it for you because this will result in you not understanding it.
I can't even understand my codes... a bit.
Maybe there is a way to read more tutorials for C#?
Offline
Tomahawk wrote:what += does for OnMessage
Hahaha, I still don't know exactly
;-;
Here's a simple example:
Let's say you have a
string Tutorial = "AB";
If you do
Tutorial += "C";
, Tutorial will now be equal to
ABC
.
The OnMessage += functions in the same way, except not with strings, with delegates ( delegates/voids/Action ).
Offline
[ Started around 1732413168.7514 - Generated in 0.065 seconds, 10 queries executed - Memory usage: 1.62 MiB (Peak: 1.81 MiB) ]