error in giveplayerid!
#1

I get this error:

Код:
G:\MySAMP\gamemodes\AeroCnC.pwn(5640) : warning 215: expression has no effect
G:\MySAMP\gamemodes\AeroCnC.pwn(5641) : warning 215: expression has no effect
G:\MySAMP\gamemodes\AeroCnC.pwn(5667) : warning 215: expression has no effect
Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


3 Warnings.
Код:
  if(strcmp(cmd, "/adspawn", true) == 0 && PlayerAdminLevel[playerid] == 1337) // Forced Player Spawn
	{
  tmp = strtok(cmdtext, idx);
  if(!strlen(tmp)) {
  SendClientMessage(playerid, COLOR_ERROR, "USAGE: /adspawn (id)");
  return 1;
  }
  giveplayerid = strval(tmp);

  if(!IsNumeric(tmp)) {
  SendClientMessage(playerid, COLOR_ERROR, "USAGE: /adspawn (id) ID Must be a number");
  return 1;
  }
  if(IsSpawned[giveplayerid] == 1) {
  SendClientMessage(playerid, COLOR_ERROR, "That player is already spawned");
  return 1;
  }
  if (IsPlayerConnected(giveplayerid)) {
  new pname[24];
  GetPlayerName(giveplayerid, pname, 24);
  format(string, sizeof(string), "**(ADMIN SPAWN)** %s(%d) Forced Spawn ",pname,giveplayerid);
  SendClientMessageToAll(0xFF7F50AA, string);
  printf("%s", string);
  SpawnPlayer(giveplayerid);
  }
  else {
  format(string, sizeof(string), "ID (%d) Is not an active player", giveplayerid);
  SendClientMessage(playerid, COLOR_ERROR, string);
  }
  return 1;
  }

  if(strcmp(cmd, "/makearmy", true) == 0 && PlayerAdminLevel[playerid] == 1337) // Admin Slap
	{
  tmp = strtok(cmdtext, idx);
  if(!strlen(tmp)) {
  SendClientMessage(playerid, COLOR_ERROR, "USAGE: /makearmy (id)");
  return 1;
  }
  giveplayerid = strval(tmp);
  if(!IsNumeric(tmp)) {
  SendClientMessage(playerid, COLOR_ERROR, "USAGE: /makearmy (id) ID Must be a number");
  return 1;
  }
  if(!IsPlayerConnected(giveplayerid)) {
  format(string, sizeof(string), "ID (%d) Is not an active player",giveplayerid);
  SendClientMessage(playerid, COLOR_ERROR, string);
  return 1;
  }
  new pname[24];
  GetPlayerName(giveplayerid, pname, 24);
  SendClientMessage(playerid,0xFF7F50AA,"that player is now in the army");
  SendClientMessage(giveplayerid,0xFF7F50AA,"You are now in the army!");
  dUserSetINT(PlayerName(giveplayerid)).("canusearmy",1);
  gTeam[giveplayerid] == TEAM_ARMY; //5640
  CanUseArmy[giveplayerid] == 1; //5641
  return 1;
  }

  if(strcmp(cmd, "/setrob", true) == 0 && PlayerAdminLevel[playerid] == 1337) // Admin Slap
	{
  tmp = strtok(cmdtext, idx);
  if(!strlen(tmp)) {
  SendClientMessage(playerid, COLOR_ERROR, "USAGE: /setrobskill (id) (ammount)");
  return 1;
  }
  giveplayerid = strval(tmp);
  if(!IsNumeric(tmp)) {
  SendClientMessage(playerid, COLOR_ERROR, "USAGE: /setrobskill (id) (ammount) ID Must be a number");
  return 1;
  }
  if(!IsPlayerConnected(giveplayerid)) {
  format(string, sizeof(string), "ID (%d) Is not an active player",giveplayerid);
  SendClientMessage(playerid, COLOR_ERROR, string);
  return 1;
  }
  new ammount = strval(tmp);
  new pname[24];
  GetPlayerName(giveplayerid, pname, 24);
  SendClientMessage(playerid, 0xFF7F50AA, "that player is now a bigger level robber");
  SendClientMessage(giveplayerid, 0xFF7F50AA, "You are now level bigger in rob skill");
  robberrank[giveplayerid] == ammount; //5667
  return 1;
  }
what's wrong?
Reply
#2

Replace
Код:
==
to
Код:
=
easy? xD
Reply
#3

Quote:
Originally Posted by Jefff
Replace
Код:
==
to
Код:
=
easy? xD
Only at the places where you change the value of variables. NOT at the if() statements.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)