Author Topic: Donator Mod  (Read 5099 times)

That couldn't even work! It just calls findclientbyname, it doesn't return anything at all.
Oh yeah. True.

Yep, he's using the export() function to write to the server/prefs.cs file. He doesn't seem to understand that it overwrites all the other data in the file, and could potentially make a server lose all it's preferences if the normal prefs export isn't triggered before the server shuts down.
So you're saying that Script_Moderator does the same thing? Because I used exactly the same event (Well, modified name, etc.) as from that.
That couldn't even work! It just calls findclientbyname, it doesn't return anything at all.
This does work.

That couldn't even work! It just calls findclientbyname, it doesn't return anything at all.
Torquescript returns the last expression that's evaluated, so it actually would work surprisingly.



Torquescript returns the last expression that's evaluated, so it actually would work surprisingly.

[img]http://i3.kym-cdn.com/photos/images/newsfeed/000/620/434/f9e.gif[/img]

Not really the last expression. It's extremely inconsistent.

function f() { %x = 5; } echo(f()); // => ""
function f() { %y = 5; %x = %y; } echo(f()); // => 5
function f() { %z = 6; %y = 5; %x = %z + %y; } echo(f()); // => ""

Torquescript returns the last expression that's evaluated, so it actually would work surprisingly.
Gotta love having a scripting language partially powered by leprechaun whimsey. I just assumed when OP was testing it it was being overwritten by another instance of it. Oh well, not like there's a shortage of nails for this mod's cross.

The commands don't even work.
Did he even do this right

Nevermind
« Last Edit: January 28, 2015, 06:44:46 PM by giant tootsie rolls »

If you want the Host part to work try this.


Code: [Select]
if(%client.BL_ID == getNumKeyID())

Or if you want it to be if they aren't.


Code: [Select]
if(%client.BL_ID != getNumKeyID())
« Last Edit: January 29, 2015, 03:38:44 PM by xWither »

The script works at least, so what it looks crappy the way it is built?

The script works at least, so what it looks crappy the way it is built?

First of all, that's like saying "The lamp works at least, so what if it delivers a painful electric shock if you try to change the bulb?" because even though it may light up the room, when the bulb does burn out and needs to be replaced, you can't ignore the design flaws. Second, if you were paying attention you'd know that this mod will clear out your server preferences whenever you add or remove a donor, so an even more accurate comparison would be "The lamp works at least, so what if it sets my living room on fire when I turn it on?"

not really expected, what i expected is umm people use a donate page and when they logon they are donator automatically.


Horrible comparing

But I see what you mean when you say it would be hard to update with the code like that.

not really expected, what i expected is umm people use a donate page and when they logon they are donator automatically.
No. This is only a couple server commands to add the donator or sponsor tag to people with a few events to check if they're a donator or sponsor.

The script works at least, so what it looks crappy the way it is built?

Please leave the programming discussion to the programmers



not really expected, what i expected is umm people use a donate page and when they logon they are donator automatically.
As I stated in your request thread, this can not be handled in Torquescript

No. This is only a couple server commands to add the donator or sponsor tag to people with a few events to check if they're a donator or sponsor.
This allows for donator-only items, etc. So this thing isn't entirely useless.

can you fix this? i'd like to use it for some purpose.