[*:9zdd9mfh]Because it's a stict-ass MF, which makes it so you can't debug code easily...
I'm trying to edit youtube.lua (from VLC, which unfortunately uses Lua, ugh!). The code is failing, so I'm trying to find out why. I NEED to see the value of vars at different points in the script, to find out why it's failing, so I write this...
vlc.msg.info('youtube.lua debug - return 1 - path('..path..')')...& I get an error msg...
...I'm only trying to concatenate "a nil value" cuz the earlier code is failing & setting path to nil, why can't it just tell me the value is nil...by using my debug code, instead of bombing out?
attempt to concatenate global 'path' (a nil value)
So then I write this UGLY ASS code to workaround Lua being a dumbass...
if path==nil then path_disp='nil' else path_disp='yay' end vlc.msg.info('youtube.lua debug - return 1 - path('..path_disp..')')...I have to invent a new var, just so I can output 'nil', when it's nil.
Note: If you have an alternate solution to this problem, plz post it! -- How do I output ANY VAR, regardless of what its value might be? -- this means output nil if it's nil / don't complain that you can't output nil.[/list]
if then end(aka: not using braces for blocks) is retarded: you can't easily find the end of the block...but with braces, you can.
!=is retarded: I can easily do
==, but I forget every time what Lua changed
+=is retarded: there's just NO REASON to not have them! (dumb Lua wants:
..for concatenation is annoying:
null: I mean, just, WTF?, come on...why?[/list]
Basically, there is NOTHING about Lua that makes sense or is good.