I thought the title was pretty descriptive. Yesterday I tested it out, assuming no issues arise it'll stay installed. Using it is really simple just change
[code][/code]
to
[code=lua][/code]
Of course lua isn't the only language supported. The developers of the mod say it supports over 200 languages. Here are a couple of examples.
Code from SKFunctions.lua
--LogProgress
--Creates a log entry, the file path will need editing for your map.
-- String Bool
function LogProgress(s,n)
if(newlog == 0) then
writeto("addon\\skmc2\\iofiles\\log.txt")
write("Starting log. \nMap ID:")
write(mapID)
write("\n\n")
-- write(date("%c"))
-- write("\n")
newlog = 1
end
if(s == nil) then --Has anything actually been sent to the funtion?
appendto("addon\\skmc2\\iofiles\\log.txt")
write("Bad argument sent to LogProgress, requires string or number. Exiting function.")
write("\n\n")
flush()
else
appendto("addon\\skmc2\\iofiles\\log.txt")
write(s)
if(n >= 1) then
write("\n\n")
end
flush()
end
end
Code from schMEe.au3
Func _MSH_get_parent_index($iThisTag)
For $iParent_index = $iThisTag To 1 Step -1
If _MSH_TagIsPossibleChildOfParent($aMSHTagList[$iParent_index], $aMSHTagList[$iThisTag]) Then ExitLoop
Next
Return $iParent_index
EndFunc ;==>_MSH_get_parent_index
That is really spiffy.
I'm looking through old posts for code tags to try it out on :)
-edit
Ah. Turns out I've been using the code tag to display lists with a fixed width font.
I feel like a code exploiter now.
btw, for batch files it uses
[code=dos]
example of something.bat from ages ago:
@echo off
del addme.script
scriptmunge -platform pc -inputfile addme.lua
del scriptmunge.log