pev_frags crashing after update, either my code is bad
crash dump:
Quote:
Quote:
Quote:
Quote:
code: PHP Code:
global pcvar alive_t_frag cached on hltv round start event function public event_alive_frags_t () called when terrorist win or in hostiges not resqued txt hooked events, any ideas? |
Re: pev_frags crashing after update, either my code is bad
Nothing to do with game update, your code is bad.
The loop way shouldn't be used, because with those kind of loops, you need to check if each players is connected, this is the thing you don't check and when you try to retrieve pdata, it generates errors or crashes. Anyway, use get_players, so you can retrieve a list of connected players, and if you use filters, you can retrieve all TERRORIST at once. |
Re: pev_frags crashing after update, either my code is bad
Quote:
|
Re: pev_frags crashing after update, either my code is bad
Quote:
|
Re: pev_frags crashing after update, either my code is bad
Quote:
|
Re: pev_frags crashing after update, either my code is bad
Look how this :
PHP Code:
PHP Code:
|
Re: pev_frags crashing after update, either my code is bad
Quote:
By the way figured out what was wrong, i take get user team statement from whole statement PHP Code:
|
Re: pev_frags crashing after update, either my code is bad
This is your plugin, your job to benchmark if you don't believe me.
But suppose there are 10 players alive : Your code : 10 * get_pdata_int calls get_players : 1 * get_players |
Re: pev_frags crashing after update, either my code is bad
About get_players ConnorMcLeod , I have experience a lot of false returns .. So ( In my PLugin ) i had to remove all get_players with get_maxplayers with loop... (never bugged after that)
I have read a lot that get_players is efficient but it returns false results The interesting part is this once it bugs ( returns false results ) it doesnt work till we dont restart server, map restart also doesnt works. I have only checked get_players with team check , maybe thats what it bugs it ? Can the reason be multimods ? Running different mods in a server ... |
Re: pev_frags crashing after update, either my code is bad
@r0ck, you was used get_players in zombie mod ? Explain better (with some code example if you can) what is the problem exactly.
Maybe sometimes get_players with team-flag can result wrong in zombie mod, because zombiemod change team a lot of times and can't be updately instantly.. or somethings like this (with some private datas, scoreboard, etc.). |
| All times are GMT -4. The time now is 15:48. |
Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.