13-02-2018, 02:01 PM
|
Posts: 8
Threads: 0
Joined: Jan 2018
|
(31-01-2018, 05:55 PM)shygoo Wrote: Hey, still active . It sounds like an invalid address is being passed to the mem interface (or its possible my screen.print function is just broken). Could you provide a snippet of the JS code that's causing issues?
Hey shygoo! Good to hear from you I'm still toying around with it, apologies again if I'm missing something obvious!
Code:
mem.bindvar(this, 0x20165F5E ,'itemAtCurrent', u8)
events.ondraw(function()
{
screen.print(20, 20, 'current item value: ' + itemAtCurrent)
})
What I get from this is "current item value: false", and I'm looking to get the value returned of the item held by the player, i.e. "current item value: 7" when holding a Blue Shell.
EDIT: Also just a little note for yourself shygoo! The screen.print(x, y, text) function example has a little spelling mistake in it:-
Code:
events.ondraw(function()
{
screen.print(20, 20, "power: ' + mem.u8[0x8033B21E])
})
the quotation mark before power should be an inverted comma
(This post was last modified: 13-02-2018, 02:05 PM by UndeniablyAlex.)
|