Author Topic: Wierd error... could be RakNet related...  (Read 2201 times)

Skinney

  • Jr. Member
  • **
  • Posts: 86
  • Karma: 0
    • View Profile
Wierd error... could be RakNet related...
« on: May 07, 2006, 02:03:14 PM »
ok, so here's an extract from my code

Code: [Select]
//Registers a new account at the Server
   char Username[31];
   char Password[31];
   char Email[31];
   BitStream RegData;

   cout << "Please register a new Account" << endl
        << "Username: ";
   cin  >> Username;
   cout << "Password: ";
   cin  >> Password;
   cout << "e-mail: ";
   cin  >> Email;

   RegData.Write(Username, (int)strlen(Username));
   RegData.Write(Password, (int)strlen(Password));
   RegData.Write(Email, (int)strlen(Email));
   Peer->RPC("RegisterAccount", &RegData, HIGH_PRIORITY, RELIABLE_ORDERED, 0, UNASSIGNED_PLAYER_ID, true, false, UNASSIGNED_NETWORK_ID, &RegData);

For some stupid reason, the program does nothing after "cin >> Email;" doesnt even print a simple cout sentence... one thing that's even more wierd is if we comment out the cin >> Email; sentence, "cout << "e-mail:" won't even be displayed... so i tried adding a cin >> test; sentence at the bottom of the script and that worked, even though the program didn't resond once that key was filled...

Anyone know what the problem could be?

Also, the problem remains even if i comment out the RakNet related functions so it got nothing to do with the Bitstream function... the reason why i think it might be RakNet related is because this function is called when we receive a packet from the server.