• Welcome to Vice City Multiplayer.
 
Menu

Show posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.

Show posts Menu

Messages - donttoucht

#1
Support / Re: Server memory leak
January 22, 2011, 06:26:09 PM
Quote from: Force on January 11, 2011, 08:02:44 PM
Agreed, it's not fair on the hoster or the server owners for their servers to explode from having no ram, I've seen the effects of this and believe me, it can rip an irc network in half, not a pretty sight, people dont want to play on servers if they just all of a sudden loose connection, so something needs to be done.
It'd be unfair if you'd pay money or something else for vcmp. It's a free product, developed by enthusiasts in their free time. You run it on your own risk. Memory leak problem surely needs an oldfix, but it's completele bullshit bitching about it like devs owe you a fix and how "unfair" it is, i also assure you that everyone knows "effects of this".
#2
This script is mostly a copy of 90NINE's "aad rumble" from samp who you forgot to credit, instead adding your clan advertisements and, please note, crediting yourself for array lists lol. Needless to say that this copy has endless mistakes since aad rumble itself had a huge amount of useless/unoptimized/stupid parts. That script is VERY old, ~2007, A/D evolved for 3 years. As a proof to my words, here's a link to original one, you need to be blinded not to see that a lot of stuff was just copy pasted http://devio.us/~edhex/vcmp/v1.rar

This looks like a true garbage, i could go for months finding mistakes/useless stuff in this one, i.e.
all these spawns for each base you load are useless, you can actually use only 1 instead of 18, try to think how, it's easy. Same goes for "main spawn".

a random look into the code and...
new idx,cmd[256],tmp[256];
cmd = strtok(cmdtext,idx);

...

tmp = strtok(cmdtext, idx);

A string of 256 can be inside a string of 256? It's clearly less. And that's not the only thing. You can't type more than 64 chars in vcmp's chat, what for you use 192 more cells? This is just memory spam due to ignorance and a rush to have a copy pasted "working at leats any way" part.

Also, i think i've been talkin about this one in here somewhere already. These MAX_PLAYERS everywhere, what if i have a 20 slots server while vcmp's max is 100. What for _all_ your loops work 80 times more than needed then?

btw, lol, what's that for?
#define PI  3.1415926535897932384626433832795
maybe at least comment stuff you don't use?

that "pack" command is a very good example of indian code, even tru you're russian, too bad you never thought about how you can find values in your array and why they have to be in some special order. Scripting is made to simplify things, not to write "if "a", if "b", etc", that just shows your logic level

anyway, i guess everyone gets my opinion already...

#3
ShowRoom (pawn) / IRC echo
July 06, 2010, 07:09:05 PM
Quote from: Boss on March 03, 2010, 07:50:44 AMYou are free to code your echo in one of those "allmighty" low-level languages too.
There you go.

This isn't much like a release but a way to show that you can make echo a way easier. Feel free to do w/e with this, but keep credits, that's all i ask.

Currently running for about 2 weeks - #npt @ irc.gtanet.com

How it works like:
Redirects stdout of vcmp, fools crt to get it in real time.

What can it do:
Send w/e is printed in vcmp's console to irc.

What it can't do:
Send stuff to vcmp, THIS WAY you could have irc cmd for each rcon cmd if vcmp supported cmds from stdin of console (for example samp does). Mostly any way you'd try to connect gamemode with echo will be gay without devs making some kind of plugins support, pipes are slow and need much resources, so if you want just echo there you have it.

Why all this?
The Boss dude will soon open a slave rental shop called "PSA" offering people who'd retype messages coming from vcmp to irc and recompile script each time event from irc should affect gamemode. If you don't get the hint - he uses a waaaay too much resources.

How to run?
You'll have to recompile it and specify your own config in defines, i might understand that people would want some "config.ini" to specify all that, but i don't need that for my a/d's echo (and you need it only once too, unless you switching channel + bot names everyday), sounds dicky, but again, here i'm more like showing a way to do echo.

So to run it, after you compile it, just open rptecho.exe instead of vcmp's. Read manifest for libs dependencies. Done in VS2005.

Configs:
Most don't need any explanations, only one i'd like to say are "EXTRA_FAST", "DISALLOW_FIRST". First one will set priority to critical for a milisecs, that's done if you have something what's written in stdout VERY fast and you need to echo all that, that's pretty much useless for vcmp, disabled by default. Second is for skipping amount of first messages coming from vcmp, EVERYTHING from console is echoed so you'd want to skip server's load, you got rcon password printed at start too.

download (no mirrors please): http://rapidshare.com/files/405344700/rtpecho.rar.html
#4
ShowRoom (pawn) / Re: PSA 0.10
March 03, 2010, 12:54:08 AM
Quote from: Boss on February 13, 2010, 04:03:54 PM
Here's the executable compiled with Mono compiler: http://tdhclan.ru/files/PSAmono.exe

If I got it correctly, you should be able to run it once you install Mono runtime on your Linux machine. You can get Mono here: http://mono-project.com

I have no means of testing it apparently, so try it out and tell whether it works.
Sorry for the delay, but i should've looked into the actual code before requesting linux version. Honestly, i had some good laugh looking at it, yea, i understand that this might be the most obvious way to have IRC echo, but jesus, 100 miliseconds timer with 1024+256(!!) cells strings along with string operations & fileoperations which is the SLOWEST thing possible. And you base thing needed to be fast on this? What if i'd count huge ass scripts developed without understanding basics along with this echo running at the same time, result will be clearly no good.

Don't look at me, like i'm some fag, only complaining about everything, but this is what happens when people don't know low level programming. Even what you call "mid-level" is all mighty for you. While a simple string.split is 1 method in your .NET, it's quite big operation with many tricks and ways to perform it for example in C++ at the same time. I don't even talk about ASM, which gives you HUGE amount of power which you could never dream about in some C#. It's like everyone knows that passing pointer to function is faster than passing normal variable, no copy made this way. Lower level makes you understand what you are doing, after that you couldn't write such unreliable code.
#5
ShowRoom (pawn) / Re: PSA 0.10
February 13, 2010, 12:32:36 PM
meh... .NET... Linux version would be appreciated.
#6
ShowRoom (pawn) / Re: General Use Pawn Scripts 1.15
January 26, 2010, 08:38:33 PM
Memory spam in 95% of script, huge stack/heap usage, laggy ass mode.

new cmd[256], tmp[256];
Max a person writes isn't 256 chars for sure, more than that - 256 seems below limit of chars you can write in chatbox (not sure but it seems to be max 64 symbols).

whole script full of this.

static szGameModeName[128] = "GUPS 1.15";
...
IP[256];

I only see 9 symbols, why it's 128 cells?
IP can be 256 chars?

new PlayerInfo[MAX_PLAYERS][pInfo];
MAX_PLAYERS is max amount of players for vcmp, it's 100. But what if you have 40 slots only? What for you create 60 more? What for 60 more loop executions?

if (!IsPlayerConnected(killerid)) { // This is the "real" OnPlayerDeath
INVALID_PLAYER_ID isn't enough? Function executes slower than const.

+ infinity more things i cba to write.

BTW: "general" use, what is this? You mean like script intended to be "base" for start? If so... It's using a waaaaaaay more resources than a "base" script should.

I've been replacing all bool arrays with single vars to use with binary operations (switching bits) recently to reduce memory usage for not that "big" mode, i'm a bit amazed of all the stuff you write in this "general" script.

My suggestion is - NEVER use this even as "example" script.