Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

Newcomers AppGameKit Corner / Tier 2: Undeclared identifier

Author
Message
Cybermind
Valued Member
21
Years of Service
User Offline
Joined: 28th Nov 2002
Location: Denmark
Posted: 29th Apr 2015 14:18 Edited at: 29th Apr 2015 17:13
I am moving to tier 2 now. I get the error

"network_id : undeclared identifier"

when trying to

network_id = agk::HostNetwork("Login 1", "Host", 5997);

I tried declaring int network_id;

EDIT: I was using network_id globally, so I had to declare it globally, outside a block, by convention at top of code after includes, before any other code.

The byte chrunchers are coming...
DIVIDING BY ZERO/BECAUSE WE SUCK...
Lucas Tiridath
AGK Developer
15
Years of Service
User Offline
Joined: 28th Sep 2008
Location: Kings Langley, UK
Posted: 29th Apr 2015 21:46
int network_id; sounds right. Can we see the code to try and identify the problem?

Cybermind
Valued Member
21
Years of Service
User Offline
Joined: 28th Nov 2002
Location: Denmark
Posted: 29th Apr 2015 21:48
It works now I just had define network_id right

The byte chrunchers are coming...
DIVIDING BY ZERO/BECAUSE WE SUCK...

Login to post a reply

Server time is: 2024-03-29 08:06:43
Your offset time is: 2024-03-29 08:06:43