Ohh wow, I totally missed that. I expected that typo like that wouldn't give a nil value. Thank you!
So now I tried with colors. Having don some scripting with VBA, I recalled that writting green or blue would work. So I did this:
Language: lua
if
mainmemory.read_s32_le(0x16C8) == 912 then
gui.pixelText(5,21,"speX:" .. mainmemory.read_s32_le(0x16C8),green)
-- elseif
-- mainmemory.read_s32_le(0x16C8) == 0 then
-- gui.pixelText(5,21,"speX:" .. mainmemory.read_s32_le(0x16C8))
else
gui.pixelText(5,21,"speX:" .. mainmemory.read_s32_le(0x16C8),blue)
end
But it doesn't seem to put any blue or green. So I'm missing something. Do I have to put colors in hexadecimal format?
(The commented lines are lines that I wrote, but not ready to test that line. Basically, i wanted a color for 0, a color for 912, and one another color for any other value.)
So here is the function.
Language: lua
gui.drawText(int x, int y, string message, [Color? forecolor = null], [Color? backcolor = null], [int? fontsize = null], [string fontfamily = null], [string fontstyle = null])
As I was told, [] mean not mandatory. So if i put only one color(Like I did), it will be for the forecolor? Or both? Or neither? I don't plan to mess with fonts.