21.11.2013, 08:06
Hi.
Since no one seems to bother making an appealing help thread, or even making them readable/understandable, i decided to write this thread about it.
The example problem i will use in this thread is this:
There are often loads of things wrong with the help threads, and these are probably the most common:
1: A name that doesn't tell anything.
A nice name for the problem would be e.g. "/stats textdraw not showing". That clearly tells everyone who sees the thread name that it is about textdraws, and if they have the skill for it and want to help, they will open it and try to help you solve the problem. If your thread's name is "HELP I GET ERRORS", it doesn't reveal anything else than the fact that you DO have errors, but please, tell us what part of your script is getting errors in the title!
2: The script
Let's say your script is giving 2 warnings and 3 errors from your /stats command. They are: (not actual PAWNCC output, but you get the idea)
By just posting those and nothing else you aren't basically giving us any clue what you are trying to do. Combined with a "HELP ME REP++++++" title no one will even want to help you.
Try giving us a simple description about what you are trying to do, and also provide us with the WHOLE command's script. Let's say the command starts from line 55 and ends at 125. Don't just post the lines that are producing the errors, give us the whole code. It is far more easy to find bugs when we actually have something to look at.
If you want to make a proper error/warning help thread, you can use this basic example:
Title: "/stats command giving tag mismatch & not defined errors"
Content:
(Note that nor is the code actual code, the line numbers are messed up. This is just an example)
By reading that everyone knows clearly what you are doing and how you are doing it. They can easilly help you solve your problem.
3: lrn2script
The scripting help section is NOT a "Teach me to script" -section. It is a section that should be used for getting help in minor problems. I'd suggest you reading through the SA:MP Wiki and reading tutorials on these forums to get a hold of scripting. I started scripting the hard way: I downloaded random scripts from the internet and figured out how they worked. I learned new mechanics in scripting and I still continue to do this. Maybe it could help you, too.
My main point is, it would be really nice if all of you actually KNOW what you are doing BEFORE asking help for it. Also, please read through the PAWN manual, it tells you the descriptions for all of the warnings and errors you may encounter. I've seen this basic conversation go on in the forums for way too many times:
In these situations, and i know this sounds stupid, but: Please do not give him the actual code.
The helper in this case gave the helpee a really simple and detailed micro-tutorial on how to do it. In my opinion, this is the correct way to help people start scripting. Telling them exactly what to do, but still not doing it for them.
The thing that happens most of the time is that when you give the whole code to him, he will just slap it into his script and not even think about it.
End note:
(I just realised this went onto "How to help people", but i guess that doesn't matter)
I am going to end this tutorial for now. Bear in mind: This tutorial will be edited to be better. It needs better formatting, and i need to section it properly. I will most likely also put in new stuff, but i think this is good for now.
Please, tell me what do you think i should improve on it. I am usually pretty bad at writing tutorials because i always talk very negatively in them, and i decided to make this one a really nice one.
- Jarno
Since no one seems to bother making an appealing help thread, or even making them readable/understandable, i decided to write this thread about it.
The example problem i will use in this thread is this:
Quote:
Your gamemode has a /stats command, and it should show a textdraw to the player showing his/her kills, deaths, level, exp, time online etc. But the textdraw is not showing up. |
1: A name that doesn't tell anything.
A nice name for the problem would be e.g. "/stats textdraw not showing". That clearly tells everyone who sees the thread name that it is about textdraws, and if they have the skill for it and want to help, they will open it and try to help you solve the problem. If your thread's name is "HELP I GET ERRORS", it doesn't reveal anything else than the fact that you DO have errors, but please, tell us what part of your script is getting errors in the title!
2: The script
Let's say your script is giving 2 warnings and 3 errors from your /stats command. They are: (not actual PAWNCC output, but you get the idea)
Quote:
loose indentation on 64 loose indentation on 83 tag mismatch at 66 tag mismatch at 68 kills is not defined at 65 |
Try giving us a simple description about what you are trying to do, and also provide us with the WHOLE command's script. Let's say the command starts from line 55 and ends at 125. Don't just post the lines that are producing the errors, give us the whole code. It is far more easy to find bugs when we actually have something to look at.
If you want to make a proper error/warning help thread, you can use this basic example:
Title: "/stats command giving tag mismatch & not defined errors"
Content:
Quote:
Hi, i have a small problem: I am trying to make a /stats command that shows you your stats in a textdraw, but it isn't working. It's giving these errors & warnings: Код:
loose indentation on 64 loose indentation on 83 tag mismatch at 66 tag mismatch at 68 kills is not defined at 65 Код:
CMD:stats(playerid) { //line 64 new statstext[256]; new textdraw; format(statstext,"Kills: %d~n~Deaths: %d~n~Playtime: %d:%d:%d",kills,deaths,playhour,playminute,playsecond); // line 65 textdraw = TextDrawCreate(50,50,statstext); //line 66 TextDrawSetShadow(textdraw,4);//line 68 } //line 83 |
By reading that everyone knows clearly what you are doing and how you are doing it. They can easilly help you solve your problem.
3: lrn2script
The scripting help section is NOT a "Teach me to script" -section. It is a section that should be used for getting help in minor problems. I'd suggest you reading through the SA:MP Wiki and reading tutorials on these forums to get a hold of scripting. I started scripting the hard way: I downloaded random scripts from the internet and figured out how they worked. I learned new mechanics in scripting and I still continue to do this. Maybe it could help you, too.
My main point is, it would be really nice if all of you actually KNOW what you are doing BEFORE asking help for it. Also, please read through the PAWN manual, it tells you the descriptions for all of the warnings and errors you may encounter. I've seen this basic conversation go on in the forums for way too many times:
Quote:
Helpee: How do i make car repair automatically when it broken Helper: That's simple. Just create a timer that repeats itself. Set it to something like 200 milliseconds. In the callback, check if the player's current vehicle health is under 500, and if it is, use RepairVehicle on it. Helpee: Wat you say? Can you pls paste code, i don't know how to do that. |
The helper in this case gave the helpee a really simple and detailed micro-tutorial on how to do it. In my opinion, this is the correct way to help people start scripting. Telling them exactly what to do, but still not doing it for them.
The thing that happens most of the time is that when you give the whole code to him, he will just slap it into his script and not even think about it.
End note:
(I just realised this went onto "How to help people", but i guess that doesn't matter)
I am going to end this tutorial for now. Bear in mind: This tutorial will be edited to be better. It needs better formatting, and i need to section it properly. I will most likely also put in new stuff, but i think this is good for now.
Please, tell me what do you think i should improve on it. I am usually pretty bad at writing tutorials because i always talk very negatively in them, and i decided to make this one a really nice one.
- Jarno