Gamestudio Links
Zorro Links
Newest Posts
Zorro 2.70
by jcl. 09/29/25 09:24
optimize global parameters SOLVED
by dBc. 09/27/25 17:07
ZorroGPT
by TipmyPip. 09/27/25 10:05
assetHistory one candle shift
by jcl. 09/21/25 11:36
Plugins update
by Grant. 09/17/25 16:28
AUM Magazine
Latest Screens
Rocker`s Revenge
Stug 3 Stormartillery
Iljuschin 2
Galactic Strike X
Who's Online Now
1 registered members (TipmyPip), 18,633 guests, and 5 spiders.
Key: Admin, Global Mod, Mod
Newest Members
krishna, DrissB, James168, Ed_Love, xtns
19168 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
Problems with #define #142462
07/20/07 21:55
07/20/07 21:55
Joined: Jul 2004
Posts: 38
Germany, NRW
B
Black_Sheep Offline OP
Newbie
Black_Sheep  Offline OP
Newbie
B

Joined: Jul 2004
Posts: 38
Germany, NRW
Hi guys,
and again a question from my smoking mind

So, actually iam converting parts of locoweeds MP Tut to my own game. But as u all know, original locos Tut was written in C-Script.

I had several converting issus, but i could solve the most of them on my own.
But i have this damn problem, it all goes around this simple line:

#define MAX_CONNECTIONS 8; // max. Anzahl der Verbindungen

Its frist used in the server_called() :

function server_called()
{
// if new player connected, increment people connected
if ((event_type == EVENT_JOIN) && (people_connected <= MAX_CONNECTIONS)) // <--- This Line is the syntax Error!!!
{
people_connected += 1; // another person connected
send_var(people_connected); // send number of people connected
}

// some one disconnected
if (event_type == EVENT_LEAVE)
{
people_connected -= 1; // one less person connected to server
send_var(people_connected); // send number of people connected
}
}

And i always get a syntax error. If i replace the "MAX_CONNECTENS" into "8", it works fine! So what iam doing wrong here?

Thx for any helpfull answer!


A7 Commercial.
Re: Problems with #define [Re: Black_Sheep] #142463
07/20/07 22:06
07/20/07 22:06
Joined: Oct 2006
Posts: 873
S
Shadow969 Offline
User
Shadow969  Offline
User
S

Joined: Oct 2006
Posts: 873
wrong - #define MAX_CONNECTIONS 8;
correct - #define MAX_CONNECTIONS 8

Re: Problems with #define [Re: Shadow969] #142464
07/20/07 22:39
07/20/07 22:39
Joined: Jul 2004
Posts: 38
Germany, NRW
B
Black_Sheep Offline OP
Newbie
Black_Sheep  Offline OP
Newbie
B

Joined: Jul 2004
Posts: 38
Germany, NRW
You are right and i cant beleave that i didnt get it myself

Thank You!


A7 Commercial.

Moderated by  HeelX, Lukas, rayp, Rei_Ayanami, Superku, Tobias, TWO, VeT 

Gamestudio download | Zorro platform | shop | Data Protection Policy

oP group Germany GmbH | Birkenstr. 25-27 | 63549 Ronneburg / Germany | info (at) opgroup.de

Powered by UBB.threads™ PHP Forum Software 7.7.1