Author Topic: New Reward Fail?  (Read 2212 times)

TomTheGeek i believe made a New Rewards where its like killing streaks and stuff!
It goes: Bushido IS H@XOR - 172348217498273 kills!
Right now, it fails, i get a syntax error that it thinks it has ##R##atio
Here is complete code, please do not steal:
Code: [Select]
package TG_NewRewards
{
       function GameConnection::onDeath(%this, %sourceObject, %sourceClient, %damageType, %damLoc){
                Parent::onDeath(%this, %sourceObject, %sourceClient, %damageType, %damLoc);               

                //Reset victim's kill count
                %this.RewardKills = 0;
                }
                //Kill ratio stuff
                %this.RatioKilled++;
                }
                //Check for Self Delete
                if(%this == %sourceClient){
                        return;
                }
                        }
                %sourceClient.RatioKills++;
                }
                if(isObject(%sourceClient)){
                        %sourceClient.RewardKills++;
                        }       
                        //Check for kills in a row
                        switch(%sourceClient.RewardKills){
                                case 3:
                                    messageAllExcept(%sourceClient, '', "<font:impact:20><color:ff00ff>" @ %sourceClient.name @ " <color:ffff00>is on a RAMPAGE - 3 kills in a row!");
                                    messageClient(%sourceClient, '', "You are on a RAMPAGE - 3 kills in a row!");
                                case 6:
                                    messageAllExcept(%sourceClient, '', "<font:impact:20><color:ff00ff>" @ %sourceClient.name @ "<color:ffff00> is on a KILLING SPREE - 6 kills in a row!");
                                    messageClient(%sourceClient, '', "You are on a KILLING SPREE - 6 kills in a row!");
                                case 9:
                                    messageAllExcept(%sourceClient, '', "<font:impact:20><color:ff00ff>" @ %sourceClient.name @ " <color:ffff00>is UNSTOPPABLE - 9 kills in a row!");
                                    messageClient(%sourceClient, '', "You are UNSTOPPABLE - 9 kills in a row!");
                                case 12:
                                    messageAllExcept(%sourceClient, '', "<font:impact:20><color:ff00ff>" @ %sourceClient.name @ "<color:ffff00> is DOMINATING - 12 kills in a row!");
                                    messageClient(%sourceClient, '', "You are DOMINATING - 12 kills in a row!");
                                case 15:
                                    messageAllExcept(%sourceClient, '', "<font:impact:20><color:ff00ff>" @ %sourceClient.name @ "<color:ffff00> is GOD-LIKE - 15 kills in a row!");
                                    messageClient(%sourceClient, '', "You are GOD-LIKE - 15 kills in a row!");
                                case 18:
                                    messageAllExcept(%sourceClient, '', "<font:impact:20><color:ff00ff>" @ %sourceClient.name @ "<color:ffff00> is a H@X0R - 18 kills in a row!");
                                    messageClient(%sourceClient, '', "You are a H4X0R - 15 kills in a row!");
                }
        }
};
ActivatePackage(TG_NewRewards);

Me and amade edited it
Amade mostly found glitchs
I mostly edited the stuff.

Use the search button.  I made this exact topic months ago and it never got very far.
http://forum.blockland.us/index.php?topic=91820.0

Use the search button.  I made this exact topic months ago and it never got very far.
http://forum.blockland.us/index.php?topic=91820.0
Me and amade edit.
Lots of deletes.

I see the problem, and I don't see how Amade or your self could miss the errors. Learn to use the { and } properly.

Most likely there will be syntax errors at the cases
Code: [Select]
package TG_NewRewards
{
function GameConnection::onDeath(%this, %sourceObject, %sourceClient, %damageType, %damLoc)
{
Parent::onDeath(%this, %sourceObject, %sourceClient, %damageType, %damLoc);               
//Reset victim's kill count
%this.RewardKills = 0;
//Kill ratio stuff
%this.RatioKilled++;
//Check for Self Delete
if(%this == %sourceClient)
return;
%sourceClient.RatioKills++;
if(isObject(%sourceClient))
%sourceClient.RewardKills++;
//Check for kills in a row
switch(%sourceClient.RewardKills)
{
case 3:
messageAllExcept(%sourceClient, '', "<font:impact:20><color:ff00ff>" @ %sourceClient.name @ " <color:ffff00>is on a RAMPAGE - 3 kills in a row!");
messageClient(%sourceClient, '', "You are on a RAMPAGE - 3 kills in a row!");
case 6:
messageAllExcept(%sourceClient, '', "<font:impact:20><color:ff00ff>" @ %sourceClient.name @ "<color:ffff00> is on a KILLING SPREE - 6 kills in a row!");
messageClient(%sourceClient, '', "You are on a KILLING SPREE - 6 kills in a row!");
case 9:
messageAllExcept(%sourceClient, '', "<font:impact:20><color:ff00ff>" @ %sourceClient.name @ " <color:ffff00>is UNSTOPPABLE - 9 kills in a row!");
messageClient(%sourceClient, '', "You are UNSTOPPABLE - 9 kills in a row!");
case 12:
messageAllExcept(%sourceClient, '', "<font:impact:20><color:ff00ff>" @ %sourceClient.name @ "<color:ffff00> is DOMINATING - 12 kills in a row!");
messageClient(%sourceClient, '', "You are DOMINATING - 12 kills in a row!");
case 15:
messageAllExcept(%sourceClient, '', "<font:impact:20><color:ff00ff>" @ %sourceClient.name @ "<color:ffff00> is GOD-LIKE - 15 kills in a row!");
messageClient(%sourceClient, '', "You are GOD-LIKE - 15 kills in a row!");
case 18:
messageAllExcept(%sourceClient, '', "<font:impact:20><color:ff00ff>" @ %sourceClient.name @ "<color:ffff00> is a H@X0R - 18 kills in a row!");
messageClient(%sourceClient, '', "You are a H4X0R - 15 kills in a row!");
}
}
};
ActivatePackage(TG_NewRewards);
« Last Edit: March 13, 2010, 10:23:53 PM by HellsHero »

You
Are
EPOIC!!!! thanks sor much  :cookieMonster: i left you a cookie in your room  :cookie: :cookie:

... I don't see how Amade or your self could miss the errors. ...
Incompetence?


Although, everyone makes mistakes. The cynical answer is just more fun.

Incompetence?


Although, everyone makes mistakes. The cynical answer is just more fun.
Here, I will post a good editnof it!

I found a problem, well, not a script problem but it says "h4xor 18 kills in a row" in the first like of the haxor one, and the second line says "15 kills in a row".

Code: [Select]
package TG_NewRewards
{
function GameConnection::onDeath(%this, %sourceObject, %sourceClient, %damageType, %damLoc)
{
Parent::onDeath(%this, %sourceObject, %sourceClient, %damageType, %damLoc);               
//Reset victim's kill count
%this.RewardKills = 0;
//Kill ratio stuff
%this.RatioKilled++;
//Check for Self Delete
if(%this == %sourceClient)
return;
%sourceClient.RatioKills++;
if(isObject(%sourceClient))
%sourceClient.RewardKills++;
//Check for kills in a row
switch(%sourceClient.RewardKills)
{
case 3:
messageAllExcept(%sourceClient, '', "<font:impact:20><color:ff00ff>" @ %sourceClient.name @ " <color:ffff00>is on a RAMPAGE - 3 kills in a row!");
messageClient(%sourceClient, '', "<color:eeeeee>You are on a RAMPAGE - 3 kills in a row!");
case 6:
messageAllExcept(%sourceClient, '', "<font:impact:20><color:ff00ff>" @ %sourceClient.name @ "<color:ffff00> is on a KILLING SPREE - 6 kills in a row!");
messageClient(%sourceClient, '', "<color:ffff00>You are on a KILLING SPREE - 6 kills in a row!");
case 9:
messageAllExcept(%sourceClient, '', "<font:impact:20><color:ff00ff>" @ %sourceClient.name @ " <color:ffff00>is UNSTOPPABLE - 9 kills in a row!");
messageClient(%sourceClient, '', "<color:ff00ff>You are UNSTOPPABLE - 9 kills in a row!");
case 12:
messageAllExcept(%sourceClient, '', "<font:impact:20><color:ff00ff>" @ %sourceClient.name @ "<color:ffff00> is DOMINATING - 12 kills in a row!");
messageClient(%sourceClient, '', "<color:ff00ff>You are DOMINATING - 12 kills in a row!");
case 15:
messageAllExcept(%sourceClient, '', "<font:impact:20><color:ff00ff>" @ %sourceClient.name @ "<color:ffff00> is GOD-LIKE - 15 kills in a row!");
messageClient(%sourceClient, '', "<color:ff00ff>You are GOD-LIKE - 15 kills in a row!");
case 18:
messageAllExcept(%sourceClient, '', "<font:impact:20><color:ff00ff>" @ %sourceClient.name @ "<color:ffff00> is a H@X0R - 18 kills in a row!");
messageClient(%sourceClient, '', "<font:impact:20><color:ff00ff>You are a H4X0R - 15 kills in a row!");
}
}
};
ActivatePackage(TG_NewRewards);

Incompetence?

Although, everyone makes mistakes. The cynical answer is just more fun.
I wasn't looking for bracket errors

So..., the Reward Fail is completely new.

It still fails, it only messages the killer and the msg for everyone else is broken.


TheGeek made it, not TomTheGeek
Yay, now i have more crap to do :panda: