[Ajuda] Erros no OnPlayerRequestClass
#1

Bom galera, to criando um server do 0, mas na hora do RequestClass, tб meio dificil
Em cima do gm jб tem todos os #defines Time...
Aqui os erros :
Code:
 C:\Users\Vitor\Desktop\gm bsg-downsdaora\Gamemode SF\gamemodes\GABPC.pwn(78) : error 002: only a single statement (or expression) can follow each "case"
C:\Users\Vitor\Desktop\gm bsg-downsdaora\Gamemode SF\gamemodes\GABPC.pwn(78) : warning 215: expression has no effect
C:\Users\Vitor\Desktop\gm bsg-downsdaora\Gamemode SF\gamemodes\GABPC.pwn(82) : error 010: invalid function or declaration
C:\Users\Vitor\Desktop\gm bsg-downsdaora\Gamemode SF\gamemodes\GABPC.pwn(88) : error 010: invalid function or declaration
C:\Users\Vitor\Desktop\gm bsg-downsdaora\Gamemode SF\gamemodes\GABPC.pwn(94) : error 010: invalid function or declaration
C:\Users\Vitor\Desktop\gm bsg-downsdaora\Gamemode SF\gamemodes\GABPC.pwn(100) : error 010: invalid function or declaration
C:\Users\Vitor\Desktop\gm bsg-downsdaora\Gamemode SF\gamemodes\GABPC.pwn(106) : error 010: invalid function or declaration
C:\Users\Vitor\Desktop\gm bsg-downsdaora\Gamemode SF\gamemodes\GABPC.pwn(112) : error 010: invalid function or declaration
C:\Users\Vitor\Desktop\gm bsg-downsdaora\Gamemode SF\gamemodes\GABPC.pwn(118) : error 010: invalid function or declaration
C:\Users\Vitor\Desktop\gm bsg-downsdaora\Gamemode SF\gamemodes\GABPC.pwn(128) : error 010: invalid function or declaration
Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


9 Errors.
E aqui o public inteira
Code:
public OnPlayerRequestClass(playerid, classid)
{
switch(classid)
{
case 0:
{
SetPlayerTeam(playerid, 1);
GameTextForPlayer(playerid, "Policia", 2500, 3);
SetPlayerColor(playerid,0xFFD700FF);
SetPlayerSkin(playerid,265);
}
case 1:
{
SetPlayerTeam(playerid, 1);
GameTextForPlayer(playerid, "Policia", 2500, 3);
SetPlayerColor(playerid,0xFFD700FF);
SetPlayerSkin(playerid,267);
}
case 2:
SetPlayerTeam(playerid, 2);
GameTextForPlayer(playerid, "Grove", 2500, 3);
SetPlayerColor(playerid,0x7CFC00FF);
SetPlayerSkin(playerid,0);
}
case 3:
SetPlayerTeam(playerid, 2);
GameTextForPlayer(playerid, "Grove", 2500, 3);
SetPlayerColor(playerid,0x7CFC00FF);
SetPlayerSkin(playerid,107);
}
case 4:
SetPlayerTeam(playerid, 3);
GameTextForPlayer(playerid, "Aztecas", 2500, 3);
SetPlayerColor(playerid,0x7B68EEFF);
SetPlayerSkin(playerid,116);
}
case 5:
SetPlayerTeam(playerid, 3);
GameTextForPlayer(playerid, "Aztecas", 2500, 3);
SetPlayerColor(playerid,0x7B68EEFF);
SetPlayerSkin(playerid,115);
}
case 6:
SetPlayerTeam(playerid, 4);
GameTextForPlayer(playerid, "Ballas", 2500, 3);
SetPlayerColor(playerid,0x8A2BE2FF);
SetPlayerSkin(playerid,104);
}
case 7:
SetPlayerTeam(playerid, 4);
GameTextForPlayer(playerid, "Ballas", 2500, 3);
SetPlayerColor(playerid,0x8A2BE2FF);
SetPlayerSkin(playerid,102);
}
case 8:
SetPlayerTeam(playerid, 5);
GameTextForPlayer(playerid, "Caminhoneiros", 2500, 3);
SetPlayerColor(playerid,0x8B6969FF);
SetPlayerSkin(playerid,15);
}
case 9:
SetPlayerTeam(playerid, 5);
GameTextForPlayer(playerid, "Caminhoneiros", 2500, 3);
SetPlayerColor(playerid,0x8B6969FF);
SetPlayerSkin(playerid,1);
}
}
SetPlayerPos(playerid, 1958.3783, 1343.1572, 15.3746);
SetPlayerCameraPos(playerid, 1958.3783, 1343.1572, 15.3746);
SetPlayerCameraLookAt(playerid, 1958.3783, 1343.1572, 15.3746);
return 1;
}
Realmente nгo sei o porque dos erros, pois fiz tudo com calma. Desde jб agradeзo a todos !
Reply
#2

Arrumei, fiquei uns 5 minutos rindo da minha prуpria distraзгo! Tinha esquecido de abrir as chaves da 'case'
Pode dar @Closed
Reply
#3

Vocк sabia que existe um botгo pra editar o seu tуpico ?
Reply
#4

Cara, voce fez errado ver no Wiki sa-mp esse OnPlayerRequestClass
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)