VIP Mod Syntax Problem

Author Topic: VIP Mod Syntax Problem  (Read 2576 times)

So, Ive made a VIP with Anthonyrules144 and turns out he doesent want to help me anymore.

I tried fixing the syntax errors, some I do, but it just changes to another syntax errors, can someone help?

Quote
package VIP
{
    function serverCmdMakeVIP(%client,%victim)
    {
        //next we start the code here as we use the command /makeVip {name}
        //You want to make sure the server knows what %victim is, so we do:
        %vict = findClientByName(%victim);
        //%vict will now be used instead of %victim so the server recognizes it.
        //now we need to make sure that the player is a Admin
        if(%client.isAdmin)
        {
            //lets make sure the person isn't already a VIP
            if(%client.isVIP)
                return; //return it so it can't do anything else.
            else{
                //lets start using the victim to become VIP
                %vict.isVIP = 1;
                announce("\c2" @ %vict.name @ " has become VIP (Auto)");
               
                //now we need to add the person to a list, in RTB, by using Prefs.
                $Pref::Server::AutoVIPList = addItemToList($Pref::Server::AutoVIPList,%vict.bl_id); //this will add them to the VIP list with there BL_ID
                export("$Pref::Server::*","config/server/prefs.cs"); //making sure we have it right, we'll export this pref.
            }
        }
        else
            messageClient(%client,'',"You must be an Admin to use this command!");
    }
   
    function ServerCMDUnVIP(%client,%victim)
    {
        %vict = findClientByName(%victim)
        if(%client.isAdmin)
        {
            if(!%client.isVIP)
                return;
            else{
                $vict.isVIP = 0;
                announce("\c2 @ %vict.name @ " has been De-VIP'd (Auto)");
                $Pref::Server::AutoVIPList = removeItemFromList($Pref::Server::AutoVIPList,%vict.bl_id);
                export("$Pref::Server::*","config/server/prefs.cs");
                }
        }
   
};
activatePackage(VIP);

Thanks

Your second function misses a }.

And you're setting %vict but using $vict later.

Your second function misses a }.

And you're setting %vict but using $vict later.

Says a Syntax error on Line 32 now;

Quote
           if(!#%#client.isVIP)

Yeah you're also missing a ; in the first line in the second function.

In serverCmdUnVIP, you're missing a " after the \c2 in the announce function.

Do not use export to save server prefs. If it's under $Pref::Server::* it is already saved, and your method will not save $Pref::Net::*.

Do not use export to save server prefs. If it's under $Pref::Server::* it is already saved, and your method will not save $Pref::Net::*.
how does it save $pref::server and $pref::net to the same file?

how does it save $pref::server and $pref::net to the same file?

export(pattern, file[, append])

lol letting anthonny help you...

This isn't gonna auto set them to VIP when they join just FYI.

Anthony has been acting idiotic lately,

He joined my server and we talked about his Service, and when I got to the point where I was telling him skype doesn't work on my Computer.

He said "lol" and "Noob", I kicked him before it wen't further.

He also disconnected my hosting just because I wasn't using it for a couple minutes, and this was before I kicked him.

Anthony has been acting idiotic lately,

He joined my server and we talked about his Service, and when I got to the point where I was telling him skype doesn't work on my Computer.

He said "lol" and "Noob", I kicked him before it wen't further.

He also disconnected my hosting just because I wasn't using it for a couple minutes, and this was before I kicked him.

... okay.

This isn't gonna auto set them to VIP when they join just FYI.

How can I do that?

How can I do that?
Check to see if the client's BL_ID is on the list upon connection using GameConnection::AutoAdminCheck(%client)

How can I do that?

use hasItemOnList with the autoVIP list and %this.bl_id
If it's true then set them to VIP.