[SOLVED] small compile error -
Guns_N_Roses - 23.03.2009
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
Re: small compile error -
Dujma - 23.03.2009
can you put some more code. Where do you use this cases?
Re: small compile error -
Guns_N_Roses - 23.03.2009
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;
}
Re: small compile error -
yezizhu - 23.03.2009
WEAPON_COLLISION,not WEAPON_COLLUSION
Re: small compile error -
Guns_N_Roses - 23.03.2009
thanks! it worked,
Solved!
Re: [New Problem] small compile error -
Guns_N_Roses - 24.03.2009
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 ^
Re: [New Problem, related] small compile error -
yezizhu - 24.03.2009
GetPlayerName(playerid,name,sizeof(name));
where's it?
Re: [New Problem, related] small compile error -
Guns_N_Roses - 24.03.2009
i added that after this post to get the names to show up.
Re: [New Problem, related] small compile error -
yezizhu - 24.03.2009
Not sure if u're sending empty message then causeing crash.
try to remove "if(strlen(deathreason)>0)" in default statment
Re: [New Problem, related] small compile error -
Guns_N_Roses - 24.03.2009
tried that and got 4 errors regarding the "else" stuff blow it