otland / forgottenserver

A free and open-source MMORPG server emulator written in C++
https://otland.net
GNU General Public License v2.0
1.56k stars 1.04k forks source link

Annotations & Linter including luascript.cpp functions #4672

Closed EvilHero90 closed 2 months ago

EvilHero90 commented 2 months ago

Pull Request Prelude

Changes Proposed

This will make it easier for people with IDE's capable of linting to be able to keep track of their code. It includes all functions from luascript.cpp There is still some stuff missing, feel free to propose changes/fixes.

Issues addressed:

Codinablack commented 2 months ago

This is quite a lot, and I really like the looks of this thing.... and I understand what a linter does, but, can you explain to me how this works?

EvilHero90 commented 2 months ago

This is quite a lot, and I really like the looks of this thing.... and I understand what a linter does, but, can you explain to me how this works?

Assuming you work with vsc or cursor (not sure which other IDE's have those options) You have to enable a linter addon (preferable https://marketplace.visualstudio.com/items?itemName=sumneko.lua) Then you open your entire root folder of the tfs project you are working on and it'll automaticly find this file and it'll start checking all of the files which are load for the project and show you where you have potential errors You DON'T let this file be load by the server, it just needs to be somewhere inside the working directory that's all