[SOLVED] small compile error
#1

C:\DOCUME~1\********\Desktop\myserver\GAMEMO~1\Bor n2Fly.pwn(405) : error 017: undefined symbol "WEAPON_COLLUSION"
Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase


1 Error.


Код:
line 405| 		  	case WEAPON_COLLUSION:
weird thing is i also have WEAPON_DROWN that doesn't return errors and i don't see anything related to it
Reply
#2

can you put some more code. Where do you use this cases?
Reply
#3

this is my whole OnPlayerDeath:

Код:
public OnPlayerDeath(playerid, killerid, reason)
{
	new dname[MAX_PLAYER_NAME];
  new killer[MAX_PLAYER_NAME];
  new name[MAX_PLAYER_NAME];
  new deathreason[20];
  new string[128];
	SendDeathMessage(killerid, playerid, reason);
  SetPlayerScore(playerid,(GetPlayerScore(playerid))+1);
  GetWeaponName(reason, deathreason, 20);

  if(reason == 38)
	{
		new kstring[128];
		new kickname[MAX_PLAYER_NAME];
		GetPlayerName(killerid, kickname, sizeof(kickname));
		format(kstring, sizeof(kstring), "AdminSweep: Killer [%d]%s Has Been Banned, No Miniguns Pl0x",killer,kickname);
		printf("%s", kstring);
		SendClientMessageToAll(0xFF0000FF, kstring);
		Ban(killerid);
	}
  if (killerid == INVALID_PLAYER_ID)
  	{
	    switch (reason)
		  {
		  	case WEAPON_DROWN:
		  	{
				format(string, sizeof(string), ".: %s drowned :.", name);
		  	}
		  	
		  	case WEAPON_COLLUSION:
		  	{
		  	format(string, sizeof(string), ".: %s cratered :.", name);
		  	}
		  	
		  	default:
			  {
			  if (strlen(deathreason) > 0)
				{
					format(string, sizeof(string), ".: %s died :.", name);
				}
	  	}
		}
  }
  else
	{
		GetPlayerName(killerid, killer, sizeof(killer));
		if (strlen(deathreason) > 0)
		{
			format(string, sizeof(string), "> %s raped %s (%s)", name, dname, deathreason);
		}
		else
		{
			format(string, sizeof(string), "> %s raped %s", name, dname);
		}
	}
	SendClientMessageToAll(0x8000000FF, string);
  return 1;
}
Reply
#4

WEAPON_COLLISION,not WEAPON_COLLUSION
Reply
#5

thanks! it worked, Solved!
Reply
#6

alright everything compiled right and the collision and drown work good, but now i have another error related to death.

whenever i die like by an admin command, /kill or anything else of that nature, the server crashes. any ideas? check the OnPlayerDeath i posted above ^
Reply
#7

GetPlayerName(playerid,name,sizeof(name));
where's it?
Reply
#8

i added that after this post to get the names to show up.
Reply
#9

Not sure if u're sending empty message then causeing crash.
try to remove "if(strlen(deathreason)>0)" in default statment
Reply
#10

tried that and got 4 errors regarding the "else" stuff blow it
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)