Author Topic: Error Halt?  (Read 1266 times)

My console says theres an error on Line 17, the #s were around the "S" in Self DeleteBombs
Code: [Select]
//Self Delete Bombs
//Made By Psycho

package Self DeleteBombs {

function Self Delete(%client)
{
%client.kill();
%client.player.spawnExplosion(tankShellProjectile, 1.5, %client);
}
};
activatePackage(Self DeleteBombs);

//Toggle Self Delete Bombs

function serverCmdenableSelf Deletebombs(%client)
{

  if (%client.isAdmin==1 || client.isSuperAdmin==1)
  {
  activatePackage(Self DeleteBombs);
  }
  else
  {
    messageclient(%client,"\c3You are not an admin");
  }
   
function serverCmddisableSelf Deletebombs(%client)
{

  if (%client.isAdmin==1 || client.isSuperAdmin==1)
  {
    deactivatePackage(Self DeleteBombs);
  }
  else
  {
    messageclient(%client,"\c3You are not an admin");
  }
« Last Edit: March 12, 2009, 11:05:25 PM by Snip3r »

activatePackage is one word

activatePackage is one word
Fixed that, but now on the same line the #s are around the s in Self DeleteBombs

« Last Edit: March 12, 2009, 10:32:07 PM by Destiny/Zack0Wack0 »

Packages are used to modify already existing functions, not make new ones.
/Self Delete already exists, doesn't it?

/Self Delete already exists, doesn't it?
Yes. Well, my bad for raging, I didn't read but your still putting a function that doesnt need to be in a package there and thats not going to Self Delete. You need to call a parent:: and your missing a }; for the package before activatepackage.

There are so many things wrong with this, I have no clue where to begin.  You don't end half of the functions, the package, and also any of your else statements.  You should be using a server pref that turns the bombing off and on, instead of activating and deactivating the package.  Only the first server command needs to be in the package.  You need to kill the player in a way that is handled correctly by a minigame as the player killing themselves, and not just being killed.  Your trying to kill the client, you need to kill the client's player object. Lastly (that I can see by quickly glancing), like someone else said, activating and deactivating packages is one word.


Yes. Well, my bad for raging, I didn't read but your still putting a function that doesnt need to be in a package there and thats not going to Self Delete. You need to call a parent:: and your missing a }; for the package before activatepackage.
Don't help people when you don't know what your talking about.
« Last Edit: March 12, 2009, 10:51:31 PM by laremere »

There are so many things wrong with this, I have no clue where to begin.  You don't end half of the functions, the package, and also any of your else statements.  You should be using a server pref that turns the bombing off and on, instead of activating and deactivating the package.  Only the first server command needs to be in the package.  You need to kill the player in a way that is handled correctly by a minigame as the player killing themselves, and not just being killed.  Your trying to kill the client, you need to kill the client's player object. Lastly (that I can see by quickly glancing), like someone else said, activating and deactivating packages is one word.
Well sorry if this script is unfinished. Good god Laremere.

You asked for help, so I gave it, sorry for telling you all the things I saw you needed help with.  I guess next time I should just tell you one thing at a time so nothing ever is completed?

You asked for help, so I gave it, sorry for telling you all the things I saw you needed help with.  I guess next time I should just tell you one thing at a time so nothing ever is completed?
Now theres a problem on line 26, oh god help me!

The #s are around the s in serverCmddisableSelf Deletebombs
« Last Edit: March 12, 2009, 11:04:54 PM by Snip3r »

Post your updated code.


Ok, since you took away the schedule, you should be calling the Self Delete parent, instead of just killing the player.
Code: [Select]
parent::servercmdSelf Delete(%client);
Your also still not using a server pref to toggle the script.  What I would do is do something like setting $pref::server::Self Deletebomb to 1 (true) when enabled, and 0 (false) when disabled.  Then have an if statement in servercmd Self Delete around creating the bomb, checking if the pref is true.

Lastly, you need to end your functions with a "}"  (think of { as starting something, you always need a } tp end it)

You also should be killing the player, not the client, but since your calling the parent instead, it doesn't matter anyway.

Never mind, you need to do 1 of these 2 things:
1. Keep it in a package and do that stuff ^^
2. remove package and make it a different servercmd
« Last Edit: March 12, 2009, 11:21:07 PM by Destiny/Zack0Wack0 »

Quote
Code: [Select]
function [u]serverCmdSelf DeleteBomber[/i](%client)
Wow, you even fail at BBcode.


Your very inconsistent, first telling him to call the parent when he shouldn't, and then not telling him to when he should.  You should let them figure out and fix their code, otherwise they'll never learn.