Cannot find tag mismatch
I cannot find why im getting the errors in line 26 and 47-47.
Both of them use Ownerteam inside the code. Whats the problem? Its anti-team seems to not be working. Any ideas? PHP Code:
Code:
//AMXXPC compile.exe |
Re: Cannot find tag mismatch
You should learn bases first.
There are a lot of critical errors in your code. Tag mismatch are minor errors. |
Re: Cannot find tag mismatch
I've only corrected the tag mismatch warnings, not the critical errors :wink:
PHP Code:
|
Re: Cannot find tag mismatch
Then what are the critical errors?
I did ask why the team thing wasnt working |
Re: Cannot find tag mismatch
1) On Nadethrow, pev(pev_owner, owner) should be owner = pev(nade_id, pev_owner). And there's no reason for owner to be a global variable.
2) You should use pcvars. 3) Your logic is in the right way, but in a real situation it gets tricky. What if a player throws a grenade, then another player throws another one before the first grenade hits someone? A think a nice approach will be to store the id of the thrown grenade, then in touch_nade check if the id of the touching grenade matches the id of the thrown nade. Then you check for the players teams. |
Re: Cannot find tag mismatch
i tried it and it says undefined symbol nade_id?
|
Re: Cannot find tag mismatch
nade_id was just a placeholder, you have to find the thrown grenade's id and use it.
|
Re: Cannot find tag mismatch
How would i do that?
Should i use: http://www.amxmodx.org/funcwiki.php?go=func&id=398 --- get_grenade or http://www.amxmodx.org/funcwiki.php?go=func&id=369 --- get_grenade_id get_grenade says this: Gets the grenade is thrown by a user. That doesn't make much sense |
Re: Cannot find tag mismatch
You should use get_grenade_id, but it seems not possible to detect the player who fired Ham_Weapon_PrimaryAttack.
Found it: grenade_throw has everything you need. |
Re: Cannot find tag mismatch
This is from my nadeslap plugin.
PHP Code:
|
| All times are GMT -4. The time now is 07:26. |
Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.