Android Question CallSubPlus : java.lang.Exception: Sub scrivi_bit signature does not match expected signature.

coslad

Well-Known Member
Licensed User
Longtime User
Hi

i'm tring to use the Callsubplus2 , but it create an error in the "callsubutils_tmr_tick (java line: 153)"

this is the call :

B4X:
Starter.csu.CallSubPlus2(Me, "scrivi_bit", 500, Array(0x00, 0))

this is the sub :

B4X:
scrivi_bit(cosa_scrivere As Byte,offset As Int)

i need to pass a byte and a int !

Any idea ?

Thanks
 

DonManfred

Expert
Licensed User
Longtime User
Hiding the error message does not help us to help you
Edit: Sorry, it´s in the threadtitle
 
Upvote 0

Jeffrey Cameron

Well-Known Member
Licensed User
Longtime User
Starter.csu.CallSubPlus2(Me, "scrivi_bit", 500, Array(0x00, 0))
this is the sub :

scrivi_bit(cosa_scrivere As Byte,offset As Int)
i need to pass a byte and a int !
It looks like your callsub2 is passing (INT, ARRAY) while the sub is expecting (ARRAY, INT).
 
Upvote 0

DonManfred

Expert
Licensed User
Longtime User
Based on the documentation the problem is your target sub. It should have ONE Parameter of type Object().
snap084.png

The solution may be something like
B4X:
sub scrivi_bit(params() As Object)
dim cosa_scrivere As Byte = params(0)
dim  offset As Int = params(1)
....
end sub
 
Upvote 0

coslad

Well-Known Member
Licensed User
Longtime User
Thanks ,

the sub scrivi_bit is used in many calls , so i prefeer use sleep function .
 
Upvote 0
Top