Author Topic: A General Problem in my Script. (Still won't work :(!  (Read 1486 times)

The whole script won't work, could anyone help?
Code: [Select]
package PPT_Server
{
   function GameConnection::onConnect(%client, %name)
   {   
if (%client.clanPrefix $= "PPT" || %client.clanSuffix $= "PPT" || %client.clanSuffix $= ".PPT" || %client.clanPreffix $= "PPT.")
{
          messageClient(%client, '', "\c2Welcome, honoured \c3PPT\c2 Member!");
          messageClient(%client, '', "\c2You will always be welcome at \c0Runeth's PPT server.");
          Parent::onConnect(%client, %name);
}
else
{
        messageClient(%client, '', "\c2Welcome to \c0Runeth's PPT server. \c3Runeth\c2's last name was \"Hooga the Pirate\" if you didn't know.");
          messageClient(%client, '', "\c2Runeth isn't the leader of PPT, \c3Jervan\c2 is! Respect all Admins/Super Admins and have fun.");
        messageClient(%client, '', "\c2For rules, type \c0/rules\c2. Thank you.");
Parent::onConnect(%client, %name);
}

function serverCmdRules(%client)
{
Parent::serverCmdRules(%client);
messageClient(%client, '', "\C01. \c3No spamming! Or Pixel Art.");
messageClient(%client, '', "\C02. \c3If you make a block, that spawn a weapon, delete it after use.");
messageClient(%client, '', "\C03. \c3If something goes wrong, blame Rikard.");
messageClient(%client, '', "\C04. \c3Flame for good reasons.");
messageClient(%client, '', "\C05. \c3Ban for good reasons");
messageClient(%client, '', "\C06. \c3Don't annoy people, without a good reason.");
messageClient(%client, '', "\c3Thanks for checking.");
}
function serverCmdWebsite(%client)
{
Parent::serverCmdWebsite(%client);
commandToClient(%client, 'messageBoxOk',"Official Webiste!","PPT's Official Website: http://www.spation.co.uk/blockland/lotr.htm");
}

function servercmdJet(%client)
{
if(%Client.isAdmin || %Client.isSuperAdmin)
{
if (PlayerStanderArmor.CanJet == 1)
{
PlayerStandardArmor.CanJet = 0;
messageAll("","\c0" @ %client.name @ " \c2took jet \c3OFF.");
}
else
{
PlayerStandardArmor.CanJet = 1;
messageAll("","\c0" @ %client.name @ " \c2took jet \c3ON.");
}
}
}

function servercmdKill(%client,%Arg)
{
if (%client.isAdmin || %client.isSuperAdmin)
{
%Victim = findclientbyname(%Arg);
{
%Victim.Player.Kill();
messageAll("","\c3" @ %client.name @ " \c2killed \c3" @ %client.name @ " \c2with Admin Powers.");
}
else
{
messageClient(%client, '', "The name doesn't exist.");
}
}
}
};
activatePackage(PPT_Server);
« Last Edit: May 26, 2008, 01:22:21 PM by Runeth »

Code: [Select]
package PPT_Server
{
   function GameConnection::onConnect(%client, %name,%a,%b,%c,%d)
   {   
if((strStr(%client.clanPrefix,"PPT") != -1) || (strStr(%client.clanSuffix,"PPT") != -1))
{
          messageClient(%client, '', "\c2Welcome, honoured \c3PPT\c2 Member!");
          messageClient(%client, '', "\c2You will always be welcome at \c0Runeth's PPT server.");
          Parent::onConnect(%client, %name);
}
else
{
        messageClient(%client, '', "\c2Welcome to \c0Runeth's PPT server. \c3Runeth\c2's last name was \"Hooga the Pirate\" if you didn't know.");
          messageClient(%client, '', "\c2Runeth isn't the leader of PPT, \c3Jervan\c2 is! Respect all Admins/Super Admins and have fun.");
        messageClient(%client, '', "\c2For rules, type \c0/rules\c2. Thank you.");
Parent::onConnect(%client, %name,%a,%b,%c,%d);
}

function serverCmdRules(%client)
{
Parent::serverCmdRules(%client);
messageClient(%client, '', "\c01. \c3No spamming! Or Pixel Art.");
messageClient(%client, '', "\c02. \c3If you make a block, that spawn a weapon, delete it after use.");
messageClient(%client, '', "\c03. \c3If something goes wrong, blame Rikard.");
messageClient(%client, '', "\c04. \c3Flame for good reasons.");
messageClient(%client, '', "\c05. \c3Ban for good reasons");
messageClient(%client, '', "\c06. \c3Don't annoy people, without a good reason.");
messageClient(%client, '', "\c3Thanks for checking.");
}
}

function serverCmdWebsite(%client)
{
messageClient(%client, '',"\c5PPT's Official Website: <a:http://www.spation.co.uk/blockland/lotr.htm>Click Here!</a>");
}

//Servercmdjet would make things appear glitchy to everyone else: Their player would start 'jetting' and keep jerking to the ground instead of actually having no jets

function servercmdKill(%client,%Arg)
{
if (%client.isAdmin || %client.isSuperAdmin)
{
%Victim = findclientbyname(%Arg);
if(isObject(%victim) && %arg !$= "")
{
%Victim.Player.Kill();
messageAll("","\c3" @ %client.name @ " \c2killed \c3" @ %client.name @ " \c2with Admin Powers.");
}
else
{
messageClient(%client, '', "The name doesn't exist.");
}
}
}
};
activatePackage(PPT_Server);
Syntax errors prevent the rest of the script from running, and there are a few I fixed. (I haven't tested this so there might still be some)

Code: [Select]
package PPT_Server
{
   function GameConnection::onConnect(%client, %name,%a,%b,%c,%d)
   {   
if((strStr(%client.clanPrefix,"PPT") != -1) || (strStr(%client.clanSuffix,"PPT") != -1))
{
          messageClient(%client, '', "\c2Welcome, honoured \c3PPT\c2 Member!");
          messageClient(%client, '', "\c2You will always be welcome at \c0Runeth's PPT server.");
          Parent::onConnect(%client, %name);
}
else
{
        messageClient(%client, '', "\c2Welcome to \c0Runeth's PPT server. \c3Runeth\c2's last name was \"Hooga the Pirate\" if you didn't know.");
          messageClient(%client, '', "\c2Runeth isn't the leader of PPT, \c3Jervan\c2 is! Respect all Admins/Super Admins and have fun.");
        messageClient(%client, '', "\c2For rules, type \c0/rules\c2. Thank you.");
Parent::onConnect(%client, %name,%a,%b,%c,%d);
}

function serverCmdRules(%client)
{
Parent::serverCmdRules(%client);
messageClient(%client, '', "\c01. \c3No spamming! Or Pixel Art.");
messageClient(%client, '', "\c02. \c3If you make a block, that spawn a weapon, delete it after use.");
messageClient(%client, '', "\c03. \c3If something goes wrong, blame Rikard.");
messageClient(%client, '', "\c04. \c3Flame for good reasons.");
messageClient(%client, '', "\c05. \c3Ban for good reasons");
messageClient(%client, '', "\c06. \c3Don't annoy people, without a good reason.");
messageClient(%client, '', "\c3Thanks for checking.");
}
}

function serverCmdWebsite(%client)
{
messageClient(%client, '',"\c5PPT's Official Website: <a:http://www.spation.co.uk/blockland/lotr.htm>Click Here!</a>");
}

//Servercmdjet would make things appear glitchy to everyone else: Their player would start 'jetting' and keep jerking to the ground instead of actually having no jets

function servercmdKill(%client,%Arg)
{
if (%client.isAdmin || %client.isSuperAdmin)
{
%Victim = findclientbyname(%Arg);
if(isObject(%victim) && %arg !$= "")
{
%Victim.Player.Kill();
messageAll("","\c3" @ %client.name @ " \c2killed \c3" @ %client.name @ " \c2with Admin Powers.");
}
else
{
messageClient(%client, '', "The name doesn't exist.");
}
}
}
};
activatePackage(PPT_Server);
Syntax errors prevent the rest of the script from running, and there are a few I fixed. (I haven't tested this so there might still be some)
Thanks Space Guy! I'll test if it works.

Quote from: code
   function serverCmdRules(%client)
   {
      Parent::serverCmdRules(%client);
      messageClient(%client, '', "\c01. \c3No spamming! Or Pixel Art.");
      messageClient(%client, '', "\c02. \c3If you make a block, that spawn a weapon, delete it after use.");
      messageClient(%client, '', "\c03. \c3If something goes wrong, blame Rikard.");
      messageClient(%client, '', "\c04. \c3Flame for good reasons.");
      messageClient(%client, '', "\c05. \c3Ban for good reasons");
      messageClient(%client, '', "\c06. \c3Don't annoy people, without a good reason.");
      messageClient(%client, '', "\c3Thanks for checking.");
      }
   }

Code: [Select]
package PPT_Server
{
   function GameConnection::onConnect(%client, %name,%a,%b,%c,%d)
   {   
if((strStr(%client.clanPrefix,"PPT") != -1) || (strStr(%client.clanSuffix,"PPT") != -1))
{
          messageClient(%client, '', "\c2Welcome, honoured \c3PPT\c2 Member!");
          messageClient(%client, '', "\c2You will always be welcome at \c0Runeth's PPT server.");
          Parent::onConnect(%client, %name);
}
else
{
        messageClient(%client, '', "\c2Welcome to \c0Runeth's PPT server. \c3Runeth\c2's last name was \"Hooga the Pirate\" if you didn't know.");
          messageClient(%client, '', "\c2Runeth isn't the leader of PPT, \c3Jervan\c2 is! Respect all Admins/Super Admins and have fun.");
        messageClient(%client, '', "\c2For rules, type \c0/rules\c2. Thank you.");
Parent::onConnect(%client, %name,%a,%b,%c,%d);
}

function serverCmdRules(%client)
{
Parent::serverCmdRules(%client);
messageClient(%client, '', "\c01. \c3No spamming! Or Pixel Art.");
messageClient(%client, '', "\c02. \c3If you make a block, that spawn a weapon, delete it after use.");
messageClient(%client, '', "\c03. \c3If something goes wrong, blame Rikard.");
messageClient(%client, '', "\c04. \c3Flame for good reasons.");
messageClient(%client, '', "\c05. \c3Ban for good reasons");
messageClient(%client, '', "\c06. \c3Don't annoy people, without a good reason.");
messageClient(%client, '', "\c3Thanks for checking.");
}
}

function serverCmdWebsite(%client)
{
messageClient(%client, '',"\c5PPT's Official Website: <a:http://www.spation.co.uk/blockland/lotr.htm>Click Here!</a>");
}

//Servercmdjet would make things appear glitchy to everyone else: Their player would start 'jetting' and keep jerking to the ground instead of actually having no jets

function servercmdKill(%client,%Arg)
{
if (%client.isAdmin || %client.isSuperAdmin)
{
%Victim = findclientbyname(%Arg);
if(isObject(%victim) && %arg !$= "")
{
%Victim.Player.Kill();
messageAll("","\c3" @ %client.name @ " \c2killed \c3" @ %client.name @ " \c2with Admin Powers.");
}
else
{
messageClient(%client, '', "The name doesn't exist.");
}
}
}
};
activatePackage(PPT_Server);
Syntax errors prevent the rest of the script from running, and there are a few I fixed. (I haven't tested this so there might still be some)
Nope didn't work still :(

Code: [Select]
long code
Syntax errors prevent the rest of the script from running, and there are a few I fixed. (I haven't tested this so there might still be some)
Nope didn't work still :(
Remove the bracket Randy highlighted.

The whole script won't work, could anyone help?

When you compile your scripts, you have the privilege of reading the syntax error reports.