Asking advice on macro to explain error codes

mike@RPI4b3:~> uname -a
Linux MikesPI 6.1.0-rpi7-rpi-v8 #1 SMP PREEMPT Debian 1:6.1.63-1+rpt1 (2023-11-24) aarch64 GNU/Linux
Version: 7.4.7.2 / LibreOffice Community
Build ID: 40(Build:2)
CPU threads: 4; OS: Linux 6.1; UI render: default; VCL: x11
Locale: en-US (C); UI: en-US
Raspbian package version: 4:7.4.7-1+rpi1+deb12u8
Calc: threaded As if it makes a difference,

Since Calc’s error messages are so terce and I found this online:
‘’‘Error Codes in LibreOffice Calc’’’
I thought to write a macro that when I entered the error code would display the explanaition.
I haven’t gotten very far running into a sytnax error immediately.
I get “BASIC syntax error. Parentheses do not match.” while this is highlited: “###”. Throwing several ‘array’ s got me past that.
Now I’m getting “Unexpected symbol: ,.” at the end of the “#FMT” statement though the right paren is hilighted. I got that fixed by putting ‘_’ at thed\ end of each array line.

Here is what I’ve got, perhaps someone can point out where I’ve gone wrong or a better approach.

Function errorCodes()
' Array(code as String, definition as String)'
	Dim ecArray() as String
  ecArray() = Array   ( _
	array( "###", "\tnone" & Chr(10) & _
		"\tThe cell is not wide enough to display the contents." ), _
	array( "#FMT", "\tnone" & Chr(10) & _
		"\tThis value is outside of limits valid for this format." ), _
	array( "501", "\tInvalid character" & Chr(10) & _
		"\tCharacter in a formula is not valid." ), _
	array( "502", "\tInvalid argument" & Chr(10) & _
		"\tFunction argument is not valid." & Chr(10) & _
		"\tFor example, a negative number for the SQRT() function," & Chr(10) & _
		"\tfor this please use IMSQRT()." ), _
	array( "503", "\t#NUM!" & Chr(10) & _
		"\tInvalid floating point operation" & Chr(10) & _
		"\tA calculation results in an overflow of the defined value range." ), _
	array( "504", "\tParameter list error" & Chr(10) & _
		"\tFunction parameter is not valid, " & Chr(10) & _
		"\tfor example, text instead of a number," & Chr(10) & _
		"\tor a domain reference instead of cell reference." ) _
   )
errorCodes = ecArray()
End Function

Sub errExplain()

	ec = InputBox( "Error Code?" )
	ecArray = errorCodes()
	For e = lBound( ecArray ) to uBound( ecArray )
		If ec = e(0) Then
			okBox( e(0) & " --> " & e(1) )
			Break
		End If
	Next
End Sub

Thanks,
Mike

with me:

uname -a
Linux december24 6.12.34+rpt-rpi-2712 #1 SMP PREEMPT Debian 1:6.12.34-1+rpt1~bookworm (2025-06-26) aarch64 GNU/Linux

Off Topic: but you should:

sudo apt-get upgrade && sudo apt-get full-upgrade