Game Development Community

Team Play Help!!

by Chris "DiGi" Timberlake · in General Discussion · 11/15/2003 (8:00 pm) · 4 replies

Can anyone help me?? i'm trying to put in the team system @
[url]http://www.garagegames.com/index.php?sec=mg&mod=resource&page=view&qid=2312[/url
and i can't figuare it our, heres my code,
Quote:MessageAll(MsgClientJoinTeam, \c2%1 joined the %2 side,

and my error
Quote:Compiling bc/server/scripts/game.cs...
bc/server/scripts/game.cs Line: 447 - Syntax error.
>>> Advanced script error report. Line 893.
>>> Some error context, with ## on sides of error halt:
^if (%teamid == 2)

^ %this.team = $Team2;



^MessageAll(MsgClientJoinTeam, \##c##2%1 joined the %2 side,^

^//MessageAll(MsgClientJoinTeam, Test,
>>> Error report complete.

Executing bc/server/scripts/game.cs.
bc/server/scripts/game.cs Line: 447 - Syntax error.
>>> Advanced script error report. Line 893.
>>> Some error context, with ## on sides of error halt:
^if (%teamid == 2)

^ %this.team = $Team2;



^MessageAll(MsgClientJoinTeam, \##c##2%1 joined the %2 side,^

^//MessageAll(MsgClientJoinTeam, Test,
>>> Error report complete.
i've tried everything i could think of!

#1
11/15/2003 (9:20 pm)
You need quotes and a closing parenth.

MessageAll(MsgClientJoinTeam, "\c2%1 joined the %2 side");

BTW, thanks for posting the error logs and stuff... Even though it was a simple question, it makes it a lot easier to address the situation.
#2
11/16/2003 (1:45 pm)
Yea, i read that on some other forums, so i figuared i'd do that
#3
11/17/2003 (8:54 pm)
Ok, now this is gonna sound dumb, but its driving me nutz, i cannot figuare this out
error:
Quote:bc/server/scripts/game.cs Line: 448 - Syntax error.
>>> Advanced script error report. Line 895.
>>> Some error context, with ## on sides of error halt:
^MessageAll(MsgClientJoinTeam, "\c2%1 joined the %2 side");

^ %this.name,##
##
^ %this.team.name,

^ %this.team.teamId,

^ %this,

^ %this.sendGuid,
>>> Error report complete.

Executing bc/server/scripts/game.cs.
bc/server/scripts/game.cs Line: 448 - Syntax error.
>>> Advanced script error report. Line 895.
>>> Some error context, with ## on sides of error halt:
^MessageAll(MsgClientJoinTeam, "\c2%1 joined the %2 side");

^ %this.name,##
##
^ %this.team.name,

^ %this.team.teamId,

^ %this,

^ %this.sendGuid,
>>> Error report complete.

Code:

Quote:
MessageAll(MsgClientJoinTeam, "\c2%1 joined the %2 side");
%this.name,
%this.team.name,
%this.team.teamId,
%this,
%this.sendGuid,
%this.score,
%this.isAiControlled(),
%this.isAdmin,
%this.isSuperAdmin);
%this.spawnPlayer();
#4
11/17/2003 (9:19 pm)
Should be..
MessageAll(MsgClientJoinTeam, "\c2%1 joined the %2 side",
%this.name,
%this.team.name,
%this.team.teamId,
%this,
%this.sendGuid,
%this.score,
%this.isAiControlled(),
%this.isAdmin,
%this.isSuperAdmin);

%this.spawnPlayer();