Error codes...

Started by Richard_b,

Richard_b

I have a problem dtermining error codes... I have used the following code to trap for bass errors...

If BASS_RecordInit(-1) = 0 Then
   Call log_event( "Error: Can't initialize device")
End If

That works fine ..but I wanted to retrive the bass error code...SO I tried...

dim Result as long
Result=BASS_RecordInit(-1)

If result<>0 then
  Call log_event( BASS_GetErrorDescription(Result))
End If


However the top code returns 0 when alls well..hoever the reult parameter always returns 1


Am I missing something obvious?

Irrational86

Yes, it is not Result that has the error code, you have to get the result of BASS_ErrorGetCode, and that is the error code you pass to the function BASS_GetErrorDescription