These error codes were formerly defined in userdefs.def. I removed them to avoid wasting memory unneccessarily, since errors return a text explanation in the $error function anyway. However, you might have some reason for checking the @error number in a script, so here they are:
EVALERR_DIVBYZERO -1;
divide by zero
EVALERR_NEGDICE -2;
negative number of dice (random operator)
EVALERR_ZERODIE -3;
invalid die (0 or negative) (random operator)
EVALERR_NULLSTR -4;
null string entered
EVALERR_PARENS
-5; mismatched parens
EVALERR_END
-6; unexpected end of expression
EVALERR_UNKNOPER -7;
unknown operator
EVALERR_NONUM
-8; number missing
EVALERR_UNKNFUNC -9;
unknown function name
EVALERR_NOMANT
-10; number has exponent with no mantissa
EVALERR_NOEXP
-11; exponent missing
EVALERR_SQRT
-12; square root calculation error
EVALERR_PARMLOW -13;
too few arguments to a function
EVALERR_PARMHIGH -14;
too many arguments to a function (right bracket expected)
EVALERR_ARGS
-15; too many arguments in macro
EVALERR_PARM
-16; invalid parm format in macro
EVALERR_PARMNO
-17; parm out of range in macro
EVALERR_NOPAREN -18;
parenthesis expected
EVALERR_ZERONEGEXP -19; pow function
domain error (x=0,y<0)
EVALERR_ZEROPOW -20;
pow function domain error (x=0,y=0)
EVALERR_NEGNOINT -21;
pow function domain error (x<0,y<>int)
EVALERR_OVERFLOW -22;
pow function overflow error
EVALERR_NOOPENUDF -23; error
opening user func file
EVALERR_FORMAT
-24; invalid user func
EVALERR_EXCEEDMAX -25; memory allocation
error loading macros
EVALERR_QUOTES
-26; quotes expected
EVALERR_COMMA
-27; comma expected
EVALERR_BRACKETS -28; mismatched
brackets
EVALERR_NOBRACKET -29; bracket expected
EVALERR_INVALSTR -30; invalid
string (can't be converted to a number)
EVALERR_STRING
-31; string given where number expected
EVALERR_NOSTRING -32; string
expected
EVALERR_MAXVARIABLES -33; attempt to define too many
variables
EVALERR_VARNOTFOUND -34; variable name not found
EVALERR_INVALVARNAME -35; attempted to define invalid
variable name
EVALERR_INVALTIMESTR -36; invalid string string given
as argument
EVALERR_INVALDATESTR -37; invalid date string given
as argument
EVALERR_ENDBEFORESTART -38; "End" cannot be before "Start" in $SEG
function
EVALERR_MASK
-39; invalid mask string
EVALERR_INTSIZE -40;
failed to convert short to long integer
EVALERR_ALREADYASSIGNED -41; variable name is reserved
EVALERR_ALREADYUSERASSIGNED -42; Variable name already assigned
to macro
EVALERR_ARGUMENTS -43; couldn't allocate
memory for macro args
EVALERR_NEGATIVEINDEX -44; negative index is invalid (in
string handling function)
EVALERR_NEGATIVELEN -45; negative length is invalid
(in string handling function)
EVALERR_STRTOOLARGE -46; string is too large
(over 1024 characters)
EVALERR_NOOPENVARLIST -47; can't open variable list file
(probably file not found)
EVALERR_IO
-48; I/O error
EVALERR_CHARNOTFOUND -49; expected character not found
EVALERR_FMT
-50; $Fmt function error
EVALERR_EXCEPTION -51; runtime exception
(system error) occurred
EVALERR_HEX
-52; invalid hexidecimal string
EVALERR_VARNAME -53;
function or variable name expected
EVALERR_OPER
-54; memory allocation failed creating TOperation
EVALERR_INVALIDOP -55; invalid operation
EVALERR_REPACK
-56; repack failed (macro name not found)
EVALERR_NILEXPR -57;
nil expression
EVALERR_NOMACROARGS -58; macro args missing
EVALERR_NOASN
-59; assignment operator expected
EVALERR_FUNCNOTFOUND -60; func name not found
EVALERR_POINTER -61;
pointer error
EVALERR_STRMEMORY -62; TEvalStrRet
allocation error
EVALERR_ZEROINDEX -63; zero or negative
index in $words_ function
EVALERR_INVALIDSTRINDEX -64; invalid string index in @asc function
EVALERR_INVALIDASNNAME -65; invalid variable name in assignment
EVALERR_NOUSERLIST -66; no user list found
EVALERR_BADVLINDEX -67; invalid vlist index
EVALERR_VLISTMEM -68; unable
to allocation memory for vlist
EVALERR_SCANF
-69; scanf error
EVALERR_ALLOCVAR -71; failed to allocate memory for numeric var
EVALERR_ALLOCSTRVAR -72; failed to allocate memory for string var
EVALERR_NOTIMPLEMENTED -73; function not implemented (for debugging)
EVALERR_VARPOINTER -74; variable pointer error
NUMERRORCODES 74
Magsbot error codes:
(General Magsbot errors.)
NOTE: Subtract NUMERRORCODES from these to get the actual number returned by Magsbot.
Note that there are some "UNUSED" error codes from previous versions of Magsbot, that can no longer occur. Maybe I'll get around to removing them from the list sometime. :)
MBERR_SDK
-1 ; sdk error
MBERR_INVALIDACT -2 ;
action name was not alphabetic
MBERR_INVALIDEVENT -3 ; event name
was not alphabetic
MBERR_UNKNACT
-4 ; didn't recognize action name
MBERR_NOTPRESENT -5 ;
avatar name not on nearby list
MBERR_UNKNCHATTYPE -6 ; invalid chat
type used in speak (internal error only)
MBERR_INSTANCE
-7; UNUSED!
MBERR_LOCATION
-8; UNUSED!
MBERR_WORLD
-9; UNUSED!
MBERR_SENDCHAT
-10; couldn't sendchat (sdk error)
MBERR_FILEIO
-11; file i/o error
MBERR_TIMER
-12; invalid timer # in start/stop timer
MBERR_DLLFUNC
-13; dll function not found
MBERR_DLLFAILED
-14; dll failed (system error)
MBERR_EXE
-15; executable failed to run (system error)
MBERR_ALREADYEXISTS -16; UNUSED!
MBERR_INVALIDROW -17;
specified nonexistant beh table row (insert,add,del)
MBERR_DLLLOAD
-18; DLL failed to load (system error), startup
MBERR_ADDR
-19; address function (IP) failed
MBERR_NOBUTTON
-20; specified nonexisitent button
MBERR_ADDBUTTON
-21; couldn't add new button to action listview
MBERR_UNKNATTR
-22; AW attribute not found
MBERR_NOCITIZENNAME -23; citizen name not
found
MBERR_NOCITIZENNUM -24; citizen number
not found
MBERR_BONE
-25; Bot Bone telegram error
MBERR_AWINITFAILED -26; AWInit failed
MBERR_INVALIDINST -27; invalid
instance number
MBERR_ALREADYCONNECTED -28; already connected
MBERR_INACTIVEINST -29; inactive
instance
MBERR_NEWINSTFAILED -30; @newinstance failed
MBERR_SETINSTFAILED -31; @setinstance failed
MBERR_SURVEYING
-32; tried to start a survey when already underway
MBERR_NEARBYLIST -33;
no nearby list for current instance!
MBERR_INVALIDADDR -34; invalid
IP address
MBERR_THREAD
-35; UNUSED!
MBERR_RECORD
-36; UNUSED!
MBERR_PLAYBACK
-37; UNUSED!
MBERR_MEMORY
-38; can't alloc new eval list variable
MBERR_QUEUE
-39; failed to create new queue item
MBERR_VARIANT
-40; error converting variant type
MBERR_PROPDUMP
-41; error reading propdump
MBERR_PDFORMAT
-42; wrong propdump format
MBERR_INVALIDATTRINDEX -43; invalid AW attribute index
MBERR_BADVARNAME -44;
bad variable name
MBERR_NOINDEX
-45; list index not found
MBERR_READONLY
-46; tried to write a read-only AW attribute
MBERR_WORLDATTRIB -47; failed
to set world attribute
MBERR_CLIENT
-48; client socket server error
MBERR_CLIENTNOTFOUND -49; client not found in
list of valid clients
MBERR_ACTQUEUE
-50; failed to create action queue item
MBERR_SURVEYPARMS -51; can't
change survey parms during a survey
MBERR_SURVEYSTOP -52;
can't stop survey, no survey in progress
MBERR_QWAIT
-53; qwait command give outside of a queue
MBERR_INVALOBJLIST -54; invalid objnum
in objlist
MBERR_DATABASE
-55; database error
MBERR_FLOODING
-56; flooding error
MBERR_HOSTNAME
-57; server name or ip not given
MBERR_ADDCATEGORY -58; failed
to add action button category
MBERR_NOCATEGORY -59;
category doesn't exist
MBERR_EJECTTYPE
-60; invalid ejection type
MBERR_BADCATEGORYINDEX -61; category index out-of-range
MBERR_BEHAVIOR
-62; invalid behavior file (header missing)
MBERR_BUTTONADDFAILED -63; failed to load action button
due to bad syntax
MBERR_BEHAVIORADDFAILED -64; failed to load behavior due to bad
syntax
MBERR_INSTANCEINFO -65; instance
information not found
MBERR_QUERYINGTERRAIN -66; terrain query failed, already
started
MBERR_TERRAINPARMS -67; can't change
terrain survey parms during terrain survey
MBERR_TERRAINQUERYSTOP -68; can't stop terrain survey, none
in progress
MBERR_TERRAINFILE -69; error
reading terrain file
MBERR_NODATA
-70; couldn't get terrain data from buffer
MBERR_ARRAYINDEX -71;
out of range in node data
MBERR_BUFFERINDEX -72; out
of range in terrain buffer
MBERR_ABEXCEPTION -73; exception
in action button
MBERR_CREATEDIR
-74; couldn't create folder
MBERR_SETDIR
-75; couldn't set directory folder
MBERR_FILEDELETE -76;
couldn't delete file
MBERR_FILERENAME -77;
couldn't rename file
MBERR_ALLOCBUFFER -78; couldn't
allocate terrain buffer
MBERR_GETHTTP
-79; error downloading file via HTTP
MBERR_SENDHTTP
-80; error uploading file via HTTP
MBERR_SERVER
-81; server failed to start
MBERR_INVALIDQ
-82; invalid queue index
MBERR_SERVERSEND -83;
server failed to send
MBERR_AVTRACKING -84;
avtracking data not found
MBERR_BADBOUNDSLIST -85; invalid bounds
list
MBERR_TERRAINBUFFER -86; terrain buffer
missing (survey not done)
MBERR_ZONEINFO -87; zone data not found
MBERR_FTPTYPE -88; invalid FTP transfer type
MBERR_BADTHREADINDEX -89;
MBERR_WINMSG -90;
MBERR_PLAYSOUND -91;
MBERR_OLVERSION -92;
MBERR_PDVERSION -93;
MBERR_POSTHTTP -94;
MBERR_SETOBJDATA -95; failed to allocate objdata vlist
MBERR_FREEMEM -96;
MBERR_MEMBLOCK -97; failed to allocate object data memblock record
MBERR_OBJDATA -98; failed to allocate object data
MBERR_NOOBJDATA -99; datastr not given in @objectadd, etc.
MBERR_TERRAINBUFSET -100;
MBERR_TERRAINSET -101;
MBERR_NOMEMBLOCK -102;
MBERR_FREEOBJDATA -103;
MBERR_ENCRYPTKEY -104;
MBERR_THREADREPACK -105;
MBERR_THREADSUSPEND -106;
MBERR_THREADRESUME -107;
MBERR_THREADEND -108;
MBERR_SETDATABLK -109; failed to allocate data block
MBERR_FREEDATABLK -110;
MBERR_NUMERRORCODES 110;