Posts: 223
Threads: 40
Joined: Aug 2015
Thanks: 22
Given 21 thank(s) in 18 post(s)
09-24-2015, 04:41 PM
Maybe create FAQ section, where post ready code for some task. It is save many time for new coders.
Example.
Post name: "Teleport player"
Code for teleport.
Post name: "Work with inventory"
Sub post: "Get main inventory list"
Sub post: "Get hot inventory list"
etc.
Posts: 4,628
Threads: 115
Joined: Dec 2011
Thanks: 693
Given 494 thank(s) in 423 post(s)
Teleporting a player is so simply that it doesn't deserve it's own post, but I can understand why people find inventory management to be difficult (even though the api should speak for itself).
Posts: 223
Threads: 40
Joined: Aug 2015
Thanks: 22
Given 21 thank(s) in 18 post(s)
09-24-2015, 04:49 PM
(This post was last modified: 09-24-2015, 04:56 PM by DrMasik.)
Not so simple as you think. For beginner.
When you create FAQ, it is create for those who start coding and don't know all aspects of server internal work.
See what people are asking in the subject of LUA. I looked through the whole topic, and I think a lot of questions because of a lack FAQ.
Posts: 4,628
Threads: 115
Joined: Dec 2011
Thanks: 693
Given 494 thank(s) in 423 post(s)
To be honest, if you'd attempt to create a plugin I expect the programmer to look at least a little in the API documentation. And if I were to search for a way to teleport a player I'd expect a function in either the player object or entity object. Then I'd just use ctrl + f to search for "Teleport" in either one of the documentation of those object.
Posts: 223
Threads: 40
Joined: Aug 2015
Thanks: 22
Given 21 thank(s) in 18 post(s)
Teleportation - this is an example. The topic can be anything.
Posts: 6,485
Threads: 176
Joined: Jan 2012
Thanks: 131
Given 1074 thank(s) in 852 post(s)
I think a better place for example code would be directly in the API docs. It would be attached to the relevant parts of the API, and since the docs are publicly available, they are indexed by search engines and so they come up in web search results, for which they are the most relevant.