Author Topic: Something seems to be messed up here  (Read 627 times)

Could I have a scripter go over this?

Code: [Select]
//Made By Psycho

function serverCmdadoptPet(%client,%petName)
  {
    new aiplayer(%petname) { datablock=horse; position=%client.player.getposition(); };
    %client.Pet=%petName;
    %petName.setshapename(%petName);
    %petName.setScale(".5 .5 .5");
    %petName.setMoveObject(%player)
  }
 
  function serverCmdabandonPet(%client,%petName)
{
    %petName.delete();
}

function serverCmdsetPetColor(%client,%petColors,%petName)
{
%petName.setColor(%petColors)
}
}

My console claims there is something wrong, please help!

Thank you!

I spot a few problems here. Red text denotes syntax errors(Game breaking stuff), blue will denote other issues with it.
Quote
//Made By Psycho

function serverCmdadoptPet(%client,%petName)
  {
    new aiplayer(%petname) { datablock=horse; position=%client.player.getposition(); };  There is no limit to the number of pets one can have, so anyone can spam pets to their liking.
    %client.Pet=%petName;
    %petName.setshapename(%petName);
    %petName.setScale(".5 .5 .5");
    %petName.setMoveObject(%player) No semicolon.
  }
 
  function serverCmdabandonPet(%client,%petName)
{
    %petName.delete(); Anyone who feels like abandoning their poor pet localclientconnection can really screw you over with this.
}

function serverCmdsetPetColor(%client,%petColors,%petName)
{
   %petName.setColor(%petColors) No semicolon.

   }  Unnessessary bracket.
}

The possibilities for messing up a server with this are endless.
It could use a bit lot of reworking.
« Last Edit: February 27, 2009, 07:25:12 PM by -Jetz- »

Im not done, but thanks anyways