Android Question Unknown member ...

Roberto Tsolakis

Member
Licensed User
Longtime User
B4A Version 7.00

In module MAIN

Code: Copy
    Dim Interest = MyModule.CalcInterest(1234, 5.2)
    ToastMessageShow(Interest,True)

In module MYMODULE

Code: Copy
    Sub CalcInterest(Capital As Double, Rate As Double) As Double
        Return Capital * Rate / 100
    End Sub

Logs report : Unknown memeber : CalcInterest
 
It's probably trying to coerce the type from a double to string, try declaring:
Code: Copy
Dim Interest As String = MyModule.CalcInterest(1234, 5.2)
 
Upvote 0
Upvote 0
I've copy this code from the GUIDE BOOK of B4A, to try it.
Stardust has help me ...
I've used a MyMOdule as ACTIVE MODULE and not as CODE MODULE.
 
Upvote 0
Back
Top