07.07.2011, 18:52
hi guys,
pawn tells me that gPlayerClass does not exist,
This is my code
I'm still learning pawn.. so I would be happy if you could help me.
(This is what PAWNO says)
C:\Users\Jorn\Desktop\TDMgame.pwn(53) : error 017: undefined symbol "gPlayerClass"
C:\Users\Jorn\Desktop\TDMgame.pwn(53) : warning 215: expression has no effect
C:\Users\Jorn\Desktop\TDMgame.pwn(53) : error 001: expected token: ";", but found "]"
C:\Users\Jorn\Desktop\TDMgame.pwn(53) : error 029: invalid expression, assumed zero
C:\Users\Jorn\Desktop\TDMgame.pwn(53) : fatal error 107: too many error messages on one line
Compilation aborted.Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase
4 Errors.
Support would be nice:P.
pawn tells me that gPlayerClass does not exist,
This is my code
Код:
public OnGameModeInit() { // Don't use these lines if it's a filterscript SetGameModeText("Blank Script"); AddPlayerClass(282,2291.6357,2457.0024,-7.1953,264.7728,3,0,24,250,29,900); // copspawn. AddPlayerClass(125,1461.5093,2773.4844,10.8203,266.7849,5,0,22,500,31,900); // maffia spawn place. return 1; } public OnGameModeExit() { return 1; } public OnPlayerRequestClass(playerid, classid) { gPlayerClass[playerid] = classid; switch (classid) { case 0: //Case 0 the character before the first one. { gTeam[playerid] = TEAM_COPS; //This checks of what team is the character of before. In this case the first character is the POLICE. GameTextForPlayer(playerid, "~g~Cops", 1000, 6); //This is the text that appears. "~g~" is the color (Green). } case 1: //Case 1 the character we added before the second. { gTeam[playerid] = TEAM_MAFFIA; GameTextForPlayer(playerid, "~r~Maffia", 1000, 6); // "~r~" (Red) } } //Spawn positions the players will see to spawn. SetPlayerPos(playerid, 489.8416,-72.4437,999.2266); SetPlayerFacingAngle( playerid, 2.3616 ); SetPlayerCameraPos(playerid, 491.6849,-72.3607,999.2117); SetPlayerCameraLookAt(playerid, 489.8416,-72.4437,999.2266); SetPlayerInterior(playerid ,11); return 1; } public OnPlayerConnect(playerid) { return 1; } public OnPlayerDisconnect(playerid, reason) { return 1; } public OnPlayerSpawn(playerid) { if(gTeam[playerid] == TEAM_COPS) { SetPlayerColor(playerid, color); } if(gTeam[playerid] == TEAM_MAFFIA) { SetPlayerColor(playerid, color); } new string[64], pName[MAX_PLAYER_NAME]; if(gTeam[playerid] == gTeam[playerid]) { GetPlayerName(playerid,pNombre,MAX_PLAYER_NAME); format(string,sizeof string,"%s has joined the battle.",pNombre); } public OnPlayerDeath(playerid, killerid, reason) { SendDeathMessage(killerid, playerid, reason); SetPlayerScore(killerid,(GetPlayerScore(killerid))+1); //This gives the killer 1 point of score. SetPlayerScore(playerid, -1); //This removes the dead player 1 point of score. new string[50]; format(string, sizeof(string), "~w~You just got your ass kicked"); GameTextForPlayer(playerid, string, 3000, 2); return 1;
(This is what PAWNO says)
C:\Users\Jorn\Desktop\TDMgame.pwn(53) : error 017: undefined symbol "gPlayerClass"
C:\Users\Jorn\Desktop\TDMgame.pwn(53) : warning 215: expression has no effect
C:\Users\Jorn\Desktop\TDMgame.pwn(53) : error 001: expected token: ";", but found "]"
C:\Users\Jorn\Desktop\TDMgame.pwn(53) : error 029: invalid expression, assumed zero
C:\Users\Jorn\Desktop\TDMgame.pwn(53) : fatal error 107: too many error messages on one line
Compilation aborted.Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase
4 Errors.
Support would be nice:P.