SA-MP Forums Archive
making team help - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: making team help (/showthread.php?tid=498291)



need help on making teams - 1fret - 02.03.2014

I am a new scripter and im trying to make a teamdeathmatch gamemode but i have problem making the teams and i following an tutorial i did everything the tutorial say but i keep getting errors. can someone tell me what i did wrong.



SetPlayerTeamFromClass(playerid, classid)
{
switch(classid)
{
case 0:
{
gTeam[playerid] = TEAM_YSPAWN;
}
case 1:
{
gTeam[playerid] = TEAM_BALLAS;
}
}
return 1;
}


and i keep getting these errors

C:\Documents and Settings\NADINE.HOME-C13C86E48E\Desktop\New Folder\sampserver 2\gamemodes\lskz.pwn(399) : error 029: invalid expression, assumed zero
C:\Documents and Settings\NADINE.HOME-C13C86E48E\Desktop\New Folder\sampserver 2\gamemodes\lskz.pwn(403) : error 029: invalid expression, assumed zero
Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase


line 399: gTeam[playerid] = TEAM_YSPAWN;

line 403: gTeam[playerid] = TEAM_BALLAS;


Re: making team help - Ahmad45123 - 02.03.2014

can you show each line with its number ?


Re: making team help - 1fret - 02.03.2014

Quote:
Originally Posted by Ahmad45123
Посмотреть сообщение
can you show each line with its number ?
There are the lines


Re: making team help - 1fret - 03.03.2014

Bump


Re: making team help - 1fret - 04.03.2014

Sorry for the third post but I really need help


Re: making team help - Konstantinos - 04.03.2014

How did you define gTeam, TEAM_YSPAWN and TEAM_BALLAS?


Re: making team help - 1fret - 05.03.2014

New gTeam [MAX_PLAYERS];

#define TEAM_YSPAWN
#define TEAM_BALLAS


Re: making team help - TomatoRage - 05.03.2014

try this :

#define TEAM_YSPAWN 1
#define TEAM_BALLAS 2


Re: making team help - 1fret - 05.03.2014

Quote:
Originally Posted by TomatoRage
Посмотреть сообщение
try this :

#define TEAM_YSPAWN 1
#define TEAM_BALLAS 2
Thanks man that helped me
+1rep