Code Monkey home page Code Monkey logo

Comments (1)

gtteamamxx avatar gtteamamxx commented on May 14, 2024

Hi @talibanaa,
Thanks for contact.

Unfurtunly I'm unable to check this issue at runtime right now, but if you look at source code

public playerSpawned(id)
{
if(!strlen(g_PlayerSelectedWeapons[id][0]) && !strlen(g_PlayerSelectedWeapons[id][1]))
showWeaponMenu(id);
set_task(0.5, "givePlayerWeapons", id + 516);
}

We can assume that the issue is because this method:
L 10/18/2021 - 21:17:46: [AMXX] [0] td_gunmod.sma::showWeaponMenu (line 541)

is invoked by this line of code

set_task(0.5, "givePlayerWeapons", id + 516);

You see that magic 0.5? It tells "open weapon menu after 0.5 seconds of player spawn".

And it looks like target player just disconnected in that 0.5s.

To fix that we could add a validation to method which throws error showWeaponMenu

public showWeaponMenu(id)
{
if(!g_isGameAvailable)
return;
static szTitle[64];
new iPlayerLevel = g_PlayerLevel[id];
formatex(szTitle, 63, "Your level:\r %d^n\wExp:\r %d\w /\r %d", iPlayerLevel, g_PlayerExp[id], g_ExpTable[iPlayerLevel]);

There's missing

if (!is_user_connected(id)) {
   return;
}

This error is not affecting a game - low priority bug. Server crashes - yeah, are caused by this mod but after some investigations year or two ago I'm 100% sure it's because this mod is maintaining high amount of entities and even on ReHLDS old GoldSrc engine can't stand that so it restarts. Maybe you can try to change monsters count on wave to 10-15 max.

I don't think there would be version 2.0. I was 16-18 with my twin brother when we created this mod. Nowadays we're professional programmers, oldest, and I don't think we have time to play games :D

Maybe in future :)

Thanks for playing this mod.
Cheers

from tower-defense.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.