We’ll that’s the simplest way. You can also be fancy about it by writing a custom script that uploads your code into the console via FTP automatically and then executes your plugin by sending in a command via telnet. I built that kind of a script before - but that’s not exactly easy to teach someone :)
So unfortunately there is no way to use the visual code debugger to debug the plugin. Like watching variables, stepping through line by line, etc. I find the MA error messages to be cryptic and unintuitive. Would be nice to somehow interface directly with a code editor and MA, but I guess that’s too much to ask!
Yeah I get that that feels like a limitation! Having worked with JavaScript for years though I can tell you that well placed log output + unit testing is mostly all you really need. Make sure you watch the video on the debug function - that way you can enable & disable the kind of output you need to understand what’s going on in your code!
Also testing! I didn’t cover this, but you can always make sure you use unit and integration testing to make sure your code works as expected. And if you want to be really fancy about it you can even use dependency injection by passing the MA2 LUA functions into your code as variables. Like that you could even end-to-end test your plugins (that was just too advanced of a topic for this course)
Simply loving the fact that you're able to teach people to copy and paste code with a straight face. Looking forward to the rest of the course
We’ll that’s the simplest way. You can also be fancy about it by writing a custom script that uploads your code into the console via FTP automatically and then executes your plugin by sending in a command via telnet. I built that kind of a script before - but that’s not exactly easy to teach someone :)
for some reason Visual Studio is reading gma in line 2 as undefined, I'm not sure whats up as its running Lua as the language
Huh weird - maybe try a different language plugin for LUA?
So unfortunately there is no way to use the visual code debugger to debug the plugin. Like watching variables, stepping through line by line, etc. I find the MA error messages to be cryptic and unintuitive. Would be nice to somehow interface directly with a code editor and MA, but I guess that’s too much to ask!
Yeah I get that that feels like a limitation! Having worked with JavaScript for years though I can tell you that well placed log output + unit testing is mostly all you really need. Make sure you watch the video on the debug function - that way you can enable & disable the kind of output you need to understand what’s going on in your code!
Also testing! I didn’t cover this, but you can always make sure you use unit and integration testing to make sure your code works as expected.
And if you want to be really fancy about it you can even use dependency injection by passing the MA2 LUA functions into your code as variables. Like that you could even end-to-end test your plugins (that was just too advanced of a topic for this course)
#4 is missing
Here you go 👉🏻 ua-cam.com/video/l3eLlb9zst4/v-deo.htmlsi=VlTPBnun9GAwDU2o