New Class
#1

I'm trying to add a new class but when I compile the gamemode I get errors

Код:
C:\Users\Documents\GT Testing\gamemodes\gamemode.pwn(1441) : error 010: invalid function or declaration
C:\Users\Documents\GT Testing\gamemodes\gamemode.pwn(72) : error 021: symbol already defined: "AddPlayerClass"
C:\Users\Documents\GT Testing\gamemodes\gamemode.pwn(1438) : error 002: only a single statement (or expression) can follow each "case"
Line 1441
Код:
	return 1;
Line 72 (That is the only AddPlayerClass I have.
Код:
AddPlayerClass(285,1319.2378,1256.4791,10.8203,3.6149,0,0,0,0,0,0); // S.W.A.T
Line 1438
Код:
	SetPlayerTeam(playerid, TEAM_SWAT);
Reply
#2

use var like
pawn Код:
new gTeam[MAX_PLAYERS];
gTeam[playerid] = TEAM_SWAT;
Reply
#3

**Still the same errors.
Reply
#4

2 Errors

Код:
C:\Users\linda\Documents\GT Testing\gamemodes\GranTrucking.pwn(73) : error 021: symbol already defined: "GameTextForPlayer"
C:\Users\linda\Documents\GT Testing\gamemodes\GranTrucking.pwn(76) : error 010: invalid function or declaration
Line 73
Код:
		GameTextForPlayer(playerid,"~b~S.W.A.T~n~SPECIAL FORCES",1000,5);
Line 76
Код:
		return 1;
Reply
#5

Can you add the 5 lines above and 3 below the line 76?So we can see and help you solve the problem.
Reply
#6

pawn Код:
GameTextForPlayer(playerid,"~b~S.W.A.T~n~SPECIAL FORCES",1000,5);
        SetPlayerTeam(playerid, TEAM_SWAT);
        SetPlayerColor(playerid, 0x33CCFFAA);
        return 1;
}
Reply
#7

More lines above?I need to see how you start it.
Reply
#8

pawn Код:
#define TEAM_SWAT 0

        GameTextForPlayer(playerid,"~b~S.W.A.T~n~SPECIAL FORCES",1000,5);
        SetPlayerTeam(playerid, TEAM_SWAT);
        SetPlayerColor(playerid, 0x33CCFFAA);
        return 1;
}
Nothing more related to the errors..
Reply
#9

Try

pawn Код:
#define TEAM_SWAT 0

        GameTextForPlayer(playerid,"~b~S.W.A.T~n~SPECIAL FORCES",1000,5);
        SetPlayerTeam(playerid, TEAM_SWAT);
        SetPlayerColor(playerid, 0x33CCFFAA);
        }
        return 1;
}
OR

pawn Код:
#define TEAM_SWAT 0

        GameTextForPlayer(playerid,"~b~S.W.A.T~n~SPECIAL FORCES",1000,5);
        SetPlayerTeam(playerid, TEAM_SWAT);
        SetPlayerColor(playerid, 0x33CCFFAA);
        }
        return 1;
OR

pawn Код:
#define TEAM_SWAT 0

        GameTextForPlayer(playerid,"~b~S.W.A.T~n~SPECIAL FORCES",1000,5);
        SetPlayerTeam(playerid, TEAM_SWAT);
        SetPlayerColor(playerid, 0x33CCFFAA);
        return 1;
Reply
#10

Quote:
Originally Posted by Necip
Посмотреть сообщение
Try

pawn Код:
#define TEAM_SWAT 0

        GameTextForPlayer(playerid,"~b~S.W.A.T~n~SPECIAL FORCES",1000,5);
        SetPlayerTeam(playerid, TEAM_SWAT);
        SetPlayerColor(playerid, 0x33CCFFAA);
        }
        return 1;
}
OR

pawn Код:
#define TEAM_SWAT 0

        GameTextForPlayer(playerid,"~b~S.W.A.T~n~SPECIAL FORCES",1000,5);
        SetPlayerTeam(playerid, TEAM_SWAT);
        SetPlayerColor(playerid, 0x33CCFFAA);
        }
        return 1;
OR

pawn Код:
#define TEAM_SWAT 0

        GameTextForPlayer(playerid,"~b~S.W.A.T~n~SPECIAL FORCES",1000,5);
        SetPlayerTeam(playerid, TEAM_SWAT);
        SetPlayerColor(playerid, 0x33CCFFAA);
        return 1;
I agree this should work.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)