Euphoria error

new topic     » topic index » view thread      » older message » newer message

I'm trying to run this Euphoria program and I get this error:
Orderold.exw:28
subscript value 3 is out of bounds, reading from a sequence of length 2 
--see ex.err


--Connect.exw
--Connect to Internet for the Store PCs
include msgbox.e
--Main
object AcctInfo
integer AcctFail
integer ComCon
integer AcctFile
integer OpenorderMsg
integer DisconnectorderMsg
integer LoadService
sequence CmdLine

--Get Command Line Info
CmdLine = command_line()
--Pull AcctInfo from file
AcctFile=open("C:\\pos\\Acct.dat","r")
AcctInfo=gets(AcctFile)
if atom(AcctInfo) then
    AcctFail = message_box("Can not Proccess User Acct file\n" &
                           "Please Call the POS Department.",
                           "File Read Failure",
                           MB_ICONERROR + MB_OK + MB_SYSTEMMODAL)
    if AcctFail = IDOK then
        abort(1)
    end if
end if
if compare(CmdLine[3],"C") = 0 then  
    OpenorderMsg = message_box("The restaurant order guide is not open 
\n" &
                             "Would you like to open it?",
                             "Order?",
                             MB_ICONQUESTION + MB_YESNO + 
MB_SYSTEMMODAL)
    if OpenorderMsg = IDYES then
        ComCon = system_exec("autoras DIAL" & AcctInfo,2)
	LoadService = system_exec("start C:\IDS\OrderEntry3\CustOrderEntry.exe 
,2)	
    else
        abort(0)
    end if
elsif compare(CmdLine[3],"D") = 0 then
    DisconnectorderMsg = message_box("You Are Currently Connected to the 
Restaurant Order guide \n" &
                                "Do You Wish to Disconnect?",
                                "Disconnect?",
                                MB_ICONQUESTION + MB_YESNO + 
MB_SYSTEMMODAL)
    if DisconnectMsg = IDYES then
        ComCon = system_exec("autoras HANGUP",2)
    else
        abort(0)
    end if        
end if
    
Thanks.
David

new topic     » topic index » view thread      » older message » newer message

Search



Quick Links

User menu

Not signed in.

Misc Menu