Why doesnt this work for me ?
#1

i was trying to classify the teams by countries with te granlarc script thingy and i dont get why i get these errors ?
Код:
ClassSel_SetupCharSelection(playerid)
{
  	if(gPlayerCitySelection[playerid] == CITY_LOS_SANTOS) {
 	gPlayerClass[playerid] = classid;
//  new string[156];
//	new pname[30];
	switch (classid) {
	  case 0:
	    {
				GameTextForPlayer(playerid, "~r~medic", 500, 6);
				{SetPlayerPos(playerid, 358.4248,2434.5625,17.0588);
         SetPlayerFacingAngle(playerid, 298.3950);
	       SetPlayerCameraPos(playerid, 361.6220,2436.0774,16.7443);
  	     SetPlayerCameraLookAt(playerid, 358.4248,2434.5625,17.0588);
  	     gTeam[playerid] = MEDIC;
  	     CreateExplosion(358.4248,2434.5625,17.0588, 12, 2); }
   		}
		case 1:
	    {
				GameTextForPlayer(playerid, "~r~general", 500, 6);
				{SetPlayerPos(playerid, 358.4248,2434.5625,17.0588);
         SetPlayerFacingAngle(playerid, 298.3950);
	       SetPlayerCameraPos(playerid, 361.6220,2436.0774,16.7443);
  	     SetPlayerCameraLookAt(playerid, 358.4248,2434.5625,17.0588);
  	     gTeam[playerid] = GENERAL;
  	     CreateExplosion(358.4248,2434.5625,17.0588, 12, 2); }
			}
    case 2:
	    {
				GameTextForPlayer(playerid, "~r~Soldier", 500, 6);
				{SetPlayerPos(playerid, 358.4248,2434.5625,17.0588);
         SetPlayerFacingAngle(playerid, 298.3950);
	       SetPlayerCameraPos(playerid, 361.6220,2436.0774,16.7443);
  	     SetPlayerCameraLookAt(playerid, 358.4248,2434.5625,17.0588);
  	     gTeam[playerid] = SOLDIER;
  	     CreateExplosion(358.4248,2434.5625,17.0588, 12, 2); }
			}
	else if(gPlayerCitySelection[playerid] == CITY_SAN_FIERRO) {
 	case 0:
	    {
				GameTextForPlayer(playerid, "~r~medic", 500, 6);
				{SetPlayerPos(playerid, 358.4248,2434.5625,17.0588);
         SetPlayerFacingAngle(playerid, 298.3950);
	       SetPlayerCameraPos(playerid, 361.6220,2436.0774,16.7443);
  	     SetPlayerCameraLookAt(playerid, 358.4248,2434.5625,17.0588);
  	     gTeam[playerid] = MEDIC1;
  	     CreateExplosion(358.4248,2434.5625,17.0588, 12, 2); }
   		}
		case 1:
	    {
				GameTextForPlayer(playerid, "~r~general", 500, 6);
				{SetPlayerPos(playerid, 358.4248,2434.5625,17.0588);
         SetPlayerFacingAngle(playerid, 298.3950);
	       SetPlayerCameraPos(playerid, 361.6220,2436.0774,16.7443);
  	     SetPlayerCameraLookAt(playerid, 358.4248,2434.5625,17.0588);
  	     gTeam[playerid] = GENERAL2;
  	     CreateExplosion(358.4248,2434.5625,17.0588, 12, 2); }
			}
    case 2:
	    {
				GameTextForPlayer(playerid, "~r~Soldier", 500, 6);
				{SetPlayerPos(playerid, 358.4248,2434.5625,17.0588);
         SetPlayerFacingAngle(playerid, 298.3950);
	       SetPlayerCameraPos(playerid, 361.6220,2436.0774,16.7443);
  	     SetPlayerCameraLookAt(playerid, 358.4248,2434.5625,17.0588);
  	     gTeam[playerid] = SOLDIER3;
  	     CreateExplosion(358.4248,2434.5625,17.0588, 12, 2); }
			}
	else if(gPlayerCitySelection[playerid] == CITY_LAS_VENTURAS) {
		case 0:
	    {
				GameTextForPlayer(playerid, "~r~medic", 500, 6);
				{SetPlayerPos(playerid, 358.4248,2434.5625,17.0588);
         SetPlayerFacingAngle(playerid, 298.3950);
	       SetPlayerCameraPos(playerid, 361.6220,2436.0774,16.7443);
  	     SetPlayerCameraLookAt(playerid, 358.4248,2434.5625,17.0588);
  	     gTeam[playerid] = MEDIC2;
  	     CreateExplosion(358.4248,2434.5625,17.0588, 12, 2); }
   		}
		case 1:
	    {
				GameTextForPlayer(playerid, "~r~general", 500, 6);
				{SetPlayerPos(playerid, 358.4248,2434.5625,17.0588);
         SetPlayerFacingAngle(playerid, 298.3950);
	       SetPlayerCameraPos(playerid, 361.6220,2436.0774,16.7443);
  	     SetPlayerCameraLookAt(playerid, 358.4248,2434.5625,17.0588);
  	     gTeam[playerid] = GENERAL3;
  	     CreateExplosion(358.4248,2434.5625,17.0588, 12, 2); }
			}
    case 2:
	    {
				GameTextForPlayer(playerid, "~r~Soldier", 500, 6);
				{SetPlayerPos(playerid, 358.4248,2434.5625,17.0588);
         SetPlayerFacingAngle(playerid, 298.3950);
	       SetPlayerCameraPos(playerid, 361.6220,2436.0774,16.7443);
  	     SetPlayerCameraLookAt(playerid, 358.4248,2434.5625,17.0588);
  	     gTeam[playerid] = SOLDIER4;
  	     CreateExplosion(358.4248,2434.5625,17.0588, 12, 2); }
			}
}
Код:
public OnPlayerRequestClass(playerid, classid)
{
  if(IsPlayerNPC(playerid)) return 1;

	if(gPlayerHasCitySelected[playerid]) {
		ClassSel_SetupCharSelection(playerid);
		return 1;
	} else {
		if(GetPlayerState(playerid) != PLAYER_STATE_SPECTATING) {
			TogglePlayerSpectating(playerid,1);
  		TextDrawShowForPlayer(playerid, txtClassSelHelper);
  		gPlayerCitySelection[playerid] = -1;
		}
 	}
return 1;
}
and i get these errors
Код:
pwn(955) : error 017: undefined symbol "classid"
.pwn(958) : error 017: undefined symbol "classid"
pwn(994) : error 002: only a single statement (or expression) can follow each "case"
pwn(1006) : error 017: undefined symbol "ClassSel_InitCityNameText"
.pwn(1008) : error 017: undefined symbol "txtInit"
.pwn(1009) : error 017: undefined symbol "txtInit"
.pwn(1010) : error 017: undefined symbol "txtInit"
.pwn(1011) : error 017: undefined symbol "txtInit"
.pwn(1012) : error 017: undefined symbol "txtInit"
.pwn(1013) : error 017: undefined symbol "txtInit"
.pwn(1019) : error 017: undefined symbol "ClassSel_InitTextDraws"
.pwn(1023) : error 017: undefined symbol "ClassSel_InitCityNameText"
.pwn(1025) : error 017: undefined symbol "ClassSel_InitCityNameText"
.pwn(1027) : error 017: undefined symbol "ClassSel_InitCityNameText"
.pwn(1045) : error 017: undefined symbol "ClassSel_SetupSelectedCity"
.pwn(1082) : error 017: undefined symbol "ClassSel_SwitchToNextCity"
.pwn(1090) : error 017: undefined symbol "ClassSel_SetupSelectedCity"
.pwn(1095) : error 017: undefined symbol "ClassSel_SwitchToPreviousCity"
.pwn(1103) : error 017: undefined symbol "ClassSel_SetupSelectedCity"
.pwn(1108) : error 017: undefined symbol "ClassSel_HandleCitySelection"
.pwn(1114) : error 017: undefined symbol "ClassSel_SwitchToNextCity"
.pwn(1115) : warning 209: function "ClassSel_SetupCharSelection" should return a value
.pwn(1119) : warning 209: function "ClassSel_SetupCharSelection" should return a value
.pwn(1128) : warning 209: function "ClassSel_SetupCharSelection" should return a value
.pwn(1132) : error 017: undefined symbol "ClassSel_SwitchToNextCity"
.pwn(1135) : error 017: undefined symbol "ClassSel_SwitchToPreviousCity"
.pwn(1217) : error 029: invalid expression, assumed zero
.pwn(1217) : error 004: function "OnVehicleSpawn" is not implemented
.pwn(1219) : error 017: undefined symbol "vehicleid"
before i tried to do this .. i didint get any errors but then ....
Reply
#2

And how to clasify them .. i couldnt .. i tied but i failed .. can anyone help me ?
Reply
#3

anyone ?
Reply
#4

cmon guys i need help
Reply
#5

bump ****
Reply
#6

anyone ,, pls help
Reply
#7

1. For one, you need to read the forum rules, Cant bump till after 12 hours of posting the thread.


Second, i'm not sure sorry.
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)