K
Khat Harr
I'm having trouble with a weird error that I don't understand the cause
of. I'm pretty new to embedding so I'm sure I'm overlooking something.
The relevant C code is as follows:
========================================
VALUE input_trigger(VALUE button) {
PspCtrlButtons cbutt = (PspCtrlButtons)NUM2ULONG(button);
if((pad.Buttons & cbutt) && !(oldpad.Buttons & cbutt)) {return Qtrue;}
return Qfalse;
}
//this gets called during initialization:
rb_define_module_function(ruby_input_mod, "trigger?",
(VALUE (*)(...))input_trigger, 1);
========================================
I get errors when calling the method though:
========================================
result = Input.trigger?(16)
========================================
It's saying
========================================
can't convert Module into Integer
========================================
I don't understand why it expects a Module there.
Can anyone see what I'm doing wrong here?
I'd really appreciate any advice.
of. I'm pretty new to embedding so I'm sure I'm overlooking something.
The relevant C code is as follows:
========================================
VALUE input_trigger(VALUE button) {
PspCtrlButtons cbutt = (PspCtrlButtons)NUM2ULONG(button);
if((pad.Buttons & cbutt) && !(oldpad.Buttons & cbutt)) {return Qtrue;}
return Qfalse;
}
//this gets called during initialization:
rb_define_module_function(ruby_input_mod, "trigger?",
(VALUE (*)(...))input_trigger, 1);
========================================
I get errors when calling the method though:
========================================
result = Input.trigger?(16)
========================================
It's saying
========================================
can't convert Module into Integer
========================================
I don't understand why it expects a Module there.
Can anyone see what I'm doing wrong here?
I'd really appreciate any advice.