To solve both of your problems:
Language: lua
local function playerinfo(color,player,y)
local address_offset = 0x010828 + 0x100 * (player - 1)
gui.drawText(335, 290 + y, color, "red", "black", 16)
gui.drawText(345, 310 + y, memory.read_s16_le(address_offset, "WRAM"), "white","black", 16)
gui.drawText(430, 310 + y, memory.read_s16_le(0x010880, "WRAM"), "white", "black", 16)
gui.drawText(520, 310 + y, memory.read_s16_le(0x010860, "WRAM"), "white", "black", 16, "Courier New", "regular", "right")
end
Notice that I changed "memory" by "address_offset" to solve the error, and declared it as local (get used to
use local inside your functions). Also, if you just want to align text, currently you have to declare fontsize, fontfamily and fontstyle before, so I used 16 (your size), "Courier New" (drawText default font), "regular" (default). In my opinion,
there should be a way to pass them as nil or something like this.