If that's supposed to be JavaScript, and N is the length of the array you're iterating over, that should be either for(var i = 0; i < N; i++) or for(var i = 0; i <= N-1; i++). If you include N, or even worse N+1, you're going to retrieve elements that don't exist, and unless your code explicitly handles undefined you'll end up with errors thrown.
And from what I see, Lua is not "totally undoable", but it definitely throws me (though not as much as what I saw of JS, which made me nope nope nope out of the gate).
If your main argument is that Lua is confusing for a total novice programmer, then I don't really know what to tell you. I think if you struggle with Lua then you'll struggle with literally any other language a MUD client might choose to support; Python isn't really any easier to learn, and I don't remember the documentation being any better.
My (almost totally uninformed) opinion is that well written - and, perhaps, this is where things start to fall down since the majority of players write the most atrociously formatted code - Lua is among the easiest of any code to read, because the syntax it uses is the closest to actual English.
If that's supposed to be JavaScript, and N is the length of the array you're iterating over, that should be either for(var i = 0; i < N; i++) or for(var i = 0; i <= N-1; i++). If you include N, or even worse N+1, you're going to retrieve elements that don't exist, and unless your code explicitly handles undefined you'll end up with errors thrown.
Yeah I realized that I messed that one up about 2 minutes too late
While I'm sure we could debate the merits of the various programming languages and their implementations, let's try to keep this thread for questions/feedback about Nexus please!
New player here, trying to figure out the basics. How would I use the @match variable in this case? I tried "@match" and "match", but both did not work for me.
Comments
Results of disembowel testing | Knight limb counter | GMCP AB files
My (almost totally uninformed) opinion is that well written - and, perhaps, this is where things start to fall down since the majority of players write the most atrociously formatted code - Lua is among the easiest of any code to read, because the syntax it uses is the closest to actual English.
Results of disembowel testing | Knight limb counter | GMCP AB files
I probably should avoid things like this at 3am. Bleh.
First: for i=1,n,1 works just fine.
Second: most iterating over tables uses ipairs(), so, theres that.
Similar trigger could be achieved through script - add this to onGMCP function.
args.gmcp_args.name == 'prone' - you can put any affliction name here