B4R Question Inline C - Error too few arguments to function

Hypnos

Active Member
Licensed User
Longtime User
I'm now working on some Inline C on B4R, my inline C code something like this:

B4X:
void wb_fillCircle(B4R::Object* usused)
{
    wb32_fillCircle(b4r_main::_x0, b4r_main::_y0, b4r_main::_r, b4r_main::_cornername, b4r_main::_delta, b4r_main::_color);
}

But I got the below error, anyone know what's wrong on my code? Thanks!

rCore.h:455: error: too few arguments to function 'void wb32_fillCircle(int16_t, int16_t, int16_t, uint8_t, int16_t, uint16_t)'
 

Hypnos

Active Member
Licensed User
Longtime User
Looks like you are missing a parameter. Where is wb32_fillCircle defined? Can you post a C example that calls it?

Hi Erel,

Here is my code:

B4X:
Sub wbFillCircle (wX0 As UInt, wY0 As UInt, wR As UInt, wCornername As UInt, wDelta As UInt, wColor As UInt)
    x0 = wX0
    y0 = wY0
    r = wR
    corner = wCornername
    delta = wDelta
    color = wColor
    RunNative("wb32_fillCircle", Null)
End Sub   


#if C
#include "wifiboy32.h"

void wb_fillCircle(B4R::Object* usused)
{
    wb32_fillCircle(b4r_main::_x0, b4r_main::_y0, b4r_main::_r, b4r_main::_cornername, b4r_main::_delta, b4r_main::_color);
}


#end if
 
Upvote 0
Top