Blockland Forums > Modification Help

Score donation script

Pages: << < (4/5) > >>

Wheatley:


--- Quote from: Headcrab Zombie on March 15, 2011, 01:11:43 PM ---checking if the client's score is greater than one is pointless

--- End quote ---
Read closely. I had it check if their score was less than one.

--- Quote from: Headcrab Zombie on March 15, 2011, 01:11:43 PM ---you want to check if the score they want to donate is greater than 0

--- End quote ---
I added that in later, realizing they could add points to themselves.

--- Quote from: Headcrab Zombie on March 15, 2011, 01:11:43 PM ---as well as later checking if the score they wish to donate is greater than their current score.

--- End quote ---
No, That's needed to check if they have enough points to donate. Otherwise they could donate huge amounts of points as long as they have at least one.

--- Quote from: Headcrab Zombie on March 15, 2011, 01:11:43 PM ---having the arguments be target then score makes more sense than score then target.

--- End quote ---
I might change that when I change what Deathwishez pointed out. Since I already submitted it, I'm going to need to re-submit it.


--- Quote from: Deathwishez on March 15, 2011, 01:11:43 PM ---This is going to look like "103998 has donated 5 to you"

--- End quote ---
forget.



Iban:

All you need to do to get the name of a client is to echo %client.name instead.

Destiny/Zack0Wack0:


--- Quote from: Iban on March 15, 2011, 11:50:55 PM ---All you need to do to get the name of a client is to echo %client.name instead.

--- End quote ---
%client.getPlayerName() is the "official" way to do it.

Iban:


--- Quote from: Destiny/Zack0Wack0 on March 15, 2011, 11:56:55 PM ---%client.getPlayerName() is the "official" way to do it.

--- End quote ---
Since when, and why? It's a property on the client.

Headcrab Zombie:


--- Quote from: Wheatley on March 15, 2011, 05:12:04 PM ---Read closely. I had it check if their score was less than one
...
No, That's needed to check if they have enough points to donate.

--- End quote ---
You're missing my point. First off, while just the if statement itself is "do this if points are less that one" the point of the entire if/else is "only donate if the points are greater than one" which is what I was referring to when I said greater than one. Second off, that if is entirely unneeded, as you are also checking if they have enough points to donate. You don't need to say "do I have points and enough points" when you can just say "do I have enough points"

Pages: << < (4/5) > >>

Go to full version