Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Syntax Error: 'NewLine'

Status
Not open for further replies.

xTiamatx

Programmer
Jul 20, 2003
22
0
0
US
Hi, I have a syntax error as the one above, but its on the first line of my program. I'm using Microsoft Visual Studio .NET, so I can still run the program, but I can't do any debugging because it can't get by the first line. Any ideas?

-Kerry
 
You have to provide some code for us to help... a syntax error is 99.9% of time programmer error.

Rocco is the BOY!!

SHUT YOUR LIPS...
ROCCOsm.gif
 
I think my computer was just being eval... I tried to comment out some code to try debugging and it rebooted my comp, after the reboot it stopped giving me THAT error... not just have to get it to properly load a dll :) (I didn't put the code because its about 2000 lines)
thx


-Kerry
 
So what is your problem now? Describe it in detail. Obviously, you can't give all your code -- just the segment that is relavent to your trouble.

-Bones
 
... If I comment out some code, it says newline error, if I uncomment the code, it says can't find msado15.dll... here's the code that I comment out from the main program

/*
int CheckAccount(SubmitPass Account)
{
_RecordsetPtr spRS;
_ConnectionPtr spCON;

try {
CREATEiNSTANCE(spCON,Connection);
spCON->ConnectionString = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=PlayerAccounts.mdb";
spCON->Open( "", "", "", -1 );
CREATEiNSTANCE(spRS,Recordset)
spRS->PutRefActiveConnection( spCON );
char szRead[256];
sprintf(szRead, "select from players where Account = '%s' AND Pass = '%s'", Account.szAccount, Account.szPassword);

spRS->Open(szRead, vtMissing, adOpenKeyset,
adLockBatchOptimistic, -1);
spCON->Close();
int yesno = spRS->RecordCount;
}
catch( _com_error &e){
_bstr_t bstrSource(e.Source());
_bstr_t bs = _bstr_t(" Error: ") + _bstr_t(e.Error()) + _bstr_t(" Msg: ")
+ _bstr_t(e.ErrorMessage()) + _bstr_t(" Description: ")
+ _bstr_t(e.Description());

MessageBox(0,bs,bstrSource, MB_OK);
}

if (yesno == 1)
{
return(1);
} else
{
return(0);
}
}

int SendErrorAccount(int GUID)
{
ErrorPac Err;
void *packet;
HRESULT hReturn;
Err.no = 1;
Err.dwSize = sizeof(ErrorPac);
Err.dwType = PACKET_TYPE_BADPASSWORD;
// Convert the packet to a void stream
packet = (VOID*)&Err;
// Send the chat packet
hReturn = hrSendServerMessage(GUID, PACKET_TYPE_BADPASSWORD,packet, DPNSEND_GUARANTEED);

return( 0 );
}

int SendServerList(GUID)
{
Servers List;
void *packet;
HRESULT hReturn;

List

List.dwSize = sizeof(Servers);
List.dwType = PACKET_TYPE_SERVERLIST;
// Convert the packet to a void stream
packet = (VOID*)&List;
// Send the chat packet
hReturn = hrSendServerMessage(GUID, PACKET_TYPE_SERVERLIST,packet, DPNSEND_GUARANTEED);

return( 0 );
}*/

here's the code that I comment out from one of my header's

/*
class SubmitPass : public PacketGeneric
{
public:
int GUID;
char szAccount[32];
char szPassword[32];
};

class ErrorPac : public PacketGeneric
{
public:
int no[2];
};

class Servers : public PacketGeneric
{
public:
char FirstGame[32];
int FirstPort[10];

char SecondGame[32];
int SecondPort[10];

char ThirdGame[32];
int ThirdPort[10];

char FourthGame[32];
int FourthPort[10];

char FifthGame[32];
int FifthPort[10];

char SixthGame[32];
int SixthPort[10];

char SeventhGame[32];
int SeventhPort[10];

char EighthGame[32];
int EighthPort[10];

char NinthGame[32];
int NinthPort[10];

char TenthGame[32];
int TenthPort[10];

char EleventhGame[32];
int EleventhPort[10];

char TwelthGame[32];
int TwelthPort[10];

char ThirteenthGame[32];
int ThirteenthPort[10];

char FourteenthGame[32];
int FourteenthPort[10];

char FifteenthGame[32];
int FifteenthPort[10];

char SixteenthGame[32];
int SixteenthPort[10];
};*/

there shouldn't be anything wrong w/ these.. but its giving me a newline error when they're commented out... that might be because some code ISNT commented out that refers to these functions/classes... but it'd be strange to give a newline error on the first line of the program
 
It looks like the board cutoff some of your code in this function - in RED


int SendServerList(GUID)
{
Servers List;
void *packet;
HRESULT hReturn;

List

List.dwSize = sizeof(Servers);
List.dwType = PACKET_TYPE_SERVERLIST;
// Convert the packet to a void stream
packet = (VOID*)&List;
// Send the chat packet
hReturn = hrSendServerMessage(GUID, PACKET_TYPE_SERVERLIST,packet, DPNSEND_GUARANTEED);

return( 0 );
}*/

**Use CODE tags


Rocco is the BOY!!

SHUT YOUR LIPS...
ROCCOsm.gif
 
... whats a CODE tag?

I took that out... I found I accidentally did that in the program.. but as I thought that doesn't make a difference...
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top