multitheftauto / mtasa-blue

Multi Theft Auto is a game engine that incorporates an extendable network play element into a proprietary commercial single-player game.
https://multitheftauto.com
GNU General Public License v3.0
1.32k stars 411 forks source link

Fix #3445 - Allow comma separated list for scriptdebugloglevel #3451

Open TracerDS opened 3 weeks ago

TracerDS commented 3 weeks ago

Fixes #3445 Fixes #3443

TracerDS commented 2 weeks ago

The issue I currently have (and the reason why its a draft) is because of internal mta's logic I cannot easily change debugscript's logic. Log files require a debug level integer instead of a vector of modes. How could I go around that?

tederis commented 2 weeks ago

The issue I currently have (and the reason why its a draft) is because of internal mta's logic I cannot easily change debugscript's logic. Log files require a debug level integer instead of a vector of modes. How could I go around that?

What exactly makes it difficult to change the debugscript's logic?

TracerDS commented 2 weeks ago

What exactly makes it difficult to change the debugscript's logic?

How would I print (and save) debug strings considering the debug level is now a vector and not an integer? The whole debugscript system needs to be changed

tederis commented 2 weeks ago

What exactly makes it difficult to change the debugscript's logic?

How would I print (and save) debug strings considering the debug level is now a vector and not an integer? The whole debugscript system needs to be changed

There is literally one line you need to change in CScriptDebugging.cpp. You can pass the set of log levels to CScriptDebugging and test whether a message should be shown or not. At least looks like this.

Log

Fernando-A-Rocha commented 1 week ago

Good job, still a draft?

TracerDS commented 1 week ago

Good job, still a draft?

Yeah, I kinda got stuck here. Something about the internals of debugLevels (enablesd-like functionality) is off

Dutchman101 commented 1 day ago

Good job, still a draft?

Yeah, I kinda got stuck here. Something about the internals of debugLevels (enablesd-like functionality) is off

@TracerDS If you could elaborate, you can enlist help from other devs. Btw, please resolve conflicts