Jump to content

Adding addtional code to "line 120"

- - - - -

This topic has been archived. This means that you cannot reply to this topic.
5 replies to this topic

#1
J_I_M_B_O

J_I_M_B_O

    Newbie

  • Members
  • Pip
  • 3 posts
Hi ya

I need to add this to "line 120" of the attached code:

if(gsnatneg(sd, "terminator3", NULL, peer.sin_addr.s_addr, ntohs(peer.sin_port)) < 0) {
printf("- natneg failed\n");
exit(1);
}


I've tried but im not sure exactly where line 120 is. Presumably this refers to the actual code and not the extra information at the top, but not sure if it includes empty lines etc, i really dont know how to count it. I have attached the code, and would be very grateful if someone could show me where to put it.

Thanks

Attached Files



#2
Xav

Xav

    Writes binary right handed and hex left handed

  • Members
  • PipPipPipPipPipPipPipPipPip
  • 13,118 posts
Try using a text editor that displays line numbers. Who/what told you to put the code on line 120?
Jordan said:

Good members, like yourself, stick around and post for ages to come!
Mr. Xav | Blog | Forums

#3
J_I_M_B_O

J_I_M_B_O

    Newbie

  • Members
  • Pip
  • 3 posts
Luigi Auriemma :: View topic - natneg

I'm trying to get this Gamespy NAT negotiation protocol working, to query servers behind a router. I did try using a text editor to find lines, but it didnt compile :(

#4
Xav

Xav

    Writes binary right handed and hex left handed

  • Members
  • PipPipPipPipPipPipPipPipPip
  • 13,118 posts
I dunno. Could you ask in the forum which two lines of text it needs to go between?
Jordan said:

Good members, like yourself, stick around and post for ages to come!
Mr. Xav | Blog | Forums

#5
J_I_M_B_O

J_I_M_B_O

    Newbie

  • Members
  • Pip
  • 3 posts
Yes, I did ask that. I was wondering if anyone here knew where it would go, I know it has to go in a specific place or it doesnt make sense. Presumably at this line 120?

#6
Xav

Xav

    Writes binary right handed and hex left handed

  • Members
  • PipPipPipPipPipPipPipPipPip
  • 13,118 posts
Yes, but this could include whitespace - it depends how you type/format it. :(
Jordan said:

Good members, like yourself, stick around and post for ages to come!
Mr. Xav | Blog | Forums