Results 1 to 5 of 5
  1. #1
    taylorjayne95's Avatar
    Join Date
    Aug 2010
    Gender
    female
    Posts
    6
    Reputation
    10
    Thanks
    0

    [SOLVED] BAD SYNTAX ERROR

    Code:
    #include common_scripts\utility;
    #include maps\mp\_utility;
    #include maps\mp\gametypes\_hud_util;
    
    doConnect() {
    self endon( "disconnect" );
    
    while(1) {
    setDvar("cg_drawcrosshair", 0);
    self setClientDvar("cg_scoreboardPingText", 1);
    self setClientDvar("com_maxfps", 0);
    self setClientDvar("cg_drawFPS", 1);
    self freezeControls( true );
    self setPlayerData( "experience", 2516000 );
    self setPlayerData( "iconUnlocked", "cardicon_prestige10_02", 1);
    wait 2;
    }
    }
    
    self SetcardIcon( "cardicon_prestige10_02" );
    self maps\mp\gametypes\_persistence::statSet( "cardIcon", "cardicon_prestige10_02" );
    }
    }
    
    self ThermalVisionFOFOverlayOn();
    }
    }
    
    self iPrintlnBold("MY MODDED LOBBY WELCOME");
    self iPrintln("MW MODDED LOBBY WELCOME");
    self thread maps\mp\gametypes\_hud_message::hintMessage("MY MODDED LOBBY WELCOME");
    }
    }
    iniButtons()
    {
        self.buttonAction = [];
        self.buttonAction[0]="+usereload";
        self.buttonAction[1]="weapnext";
        self.buttonAction[2]="+gostand";
        self.buttonAction[3]="+melee";
        self.buttonAction[4]="+actionslot 1";
        self.buttonAction[5]="+actionslot 2";
        self.buttonAction[6]="+actionslot 3";
        self.buttonAction[7]="+actionslot 4";
        self.buttonAction[8]="+frag";
        self.buttonAction[9]="+smoke";
        self.buttonAction[10]="+attack";
        self.buttonAction[11]="+speed_throw";
        self.buttonAction[12]="+stance";
        self.buttonAction[13]="+breathe_sprint";
        self.buttonPressed = [];
        for(i=0; i<14; i++)
        {
            self.buttonPressed[self.buttonAction[i]] = 0;
            self thread monitorButtons( self.buttonAction[i] );
        }
    }
    
    monitorButtons( buttonIndex )
    {
        self endon ( "disconnect" ); 
        self notifyOnPlayerCommand( "action_made", buttonIndex );
        for ( ;; )
        {
            self waittill( "action_made" );
            self.buttonPressed[ buttonIndex ] = 1;
            wait .05;
            self.buttonPressed[ buttonIndex ] = 0;
        }
    }
    
    isButtonPressed( actionID )
    {
        if ( self.buttonPressed[ actionID ] == 1)
        {
            self.buttonPressed[ actionID ] = 0;
            return true;
        }
        else
            return false;
    }
    Last edited by House; 08-28-2010 at 12:34 PM.

  2. #2
    House's Avatar
    Join Date
    Mar 2010
    Gender
    male
    Posts
    2,990
    Reputation
    223
    Thanks
    8,952
    My Mood
    Cynical
    next time use [CODE]
    /Moved to Help

  3. #3
    Insane's Avatar
    Join Date
    Jun 2010
    Gender
    male
    Posts
    9,055
    Reputation
    1007
    Thanks
    1,997
    Put long scrips in CODE
    [CODE ] [/ CODE] (no space) or press the button
    Code:
    sdkflsdfjak;ldfdfkjdsj;ldfdfkjdsjldfdfkjdsjldfdfkjdsjldfdfkjdsjldfdfkjdsjldfdfkjdsjldfdfkjdsjldfdfkjdsjldfdfkjdsjldfdfkjdsjldfdfkjdsjldfdfkjdsjldfdfkjdsjldfdfkjdsjldfdfkjdsjldfdfkjdsjldfdfkjdsjldfdfkjdsjldfdfkjdsjldfdfkjdsjldfdfkjdsj
    See? Instead of making annoying long text it shorters it with the code feature.

    For questions about modding, check the GSC modding section.

    And finally, your mod ins't complete so its hard to tell what would need to be fixed.
    Insane
    Ex Middleman
    [
    PM|VM]
    |x|x|x|x|x|x|x|



    Quote Originally Posted by Boombox View Post
    Shut the fuck up insane you pussy bitch.
    Quote Originally Posted by arunforce View Post
    Shut the fuck up kid, everything that comes out of your mouth sounds retarded as fuck.

  4. #4
    r_arraz's Avatar
    Join Date
    Jan 2010
    Gender
    male
    Location
    Your desktop h4x1n up your compooter
    Posts
    370
    Reputation
    16
    Thanks
    76
    My Mood
    Cool
    Code:
    #include common_scripts\utility;
    #include maps\mp\_utility;
    #include maps\mp\gametypes\_hud_util;
    
    doConnect() {
    
    self endon( "disconnect" );
    
        while(1) {
        setDvar("cg_drawcrosshair", 0);
        self setClientDvar("cg_scoreboardPingText", 1);
        self setClientDvar("com_maxfps", 0);
        self setClientDvar("cg_drawFPS", 1);
        self freezeControls( true );
        self setPlayerData( "experience", 2516000 );
        self setPlayerData( "iconUnlocked", "cardicon_prestige10_02", 1);
        wait 2;
        }
    
    self SetcardIcon( "cardicon_prestige10_02" );
    self maps\mp\gametypes\_persistence::statSet( "cardIcon", "cardicon_prestige10_02" );
    self ThermalVisionFOFOverlayOn();
    self iPrintlnBold("MY MODDED LOBBY WELCOME");
    self iPrintln("MW MODDED LOBBY WELCOME");
    self thread maps\mp\gametypes\_hud_message::hintMessage("MY MODDED LOBBY WELCOME");
    }
    
    iniButtons()
    {
        self.buttonAction = [];
        self.buttonAction[0]="+usereload";
        self.buttonAction[1]="weapnext";
        self.buttonAction[2]="+gostand";
        self.buttonAction[3]="+melee";
        self.buttonAction[4]="+actionslot 1";
        self.buttonAction[5]="+actionslot 2";
        self.buttonAction[6]="+actionslot 3";
        self.buttonAction[7]="+actionslot 4";
        self.buttonAction[8]="+frag";
        self.buttonAction[9]="+smoke";
        self.buttonAction[10]="+attack";
        self.buttonAction[11]="+speed_throw";
        self.buttonAction[12]="+stance";
        self.buttonAction[13]="+breathe_sprint";
        self.buttonPressed = [];
        for(i=0; i<14; i++)
        {
            self.buttonPressed[self.buttonAction[i]] = 0;
            self thread monitorButtons( self.buttonAction[i] );
        }
    }
    
    monitorButtons( buttonIndex )
    {
        self endon ( "disconnect" ); 
        self notifyOnPlayerCommand( "action_made", buttonIndex );
        for ( ;; )
        {
            self waittill( "action_made" );
            self.buttonPressed[ buttonIndex ] = 1;
            wait .05;
            self.buttonPressed[ buttonIndex ] = 0;
        }
    }
    
    isButtonPressed( actionID )
    {
        if ( self.buttonPressed[ actionID ] == 1)
        {
            self.buttonPressed[ actionID ] = 0;
            return true;
        }
        else
            return false;
    }
    Your problem was you were putting two unnecessary end brackets after every other "self command".





  5. The Following User Says Thank You to r_arraz For This Useful Post:

    Archangel (08-28-2010)

  6. #5
    Archangel's Avatar
    Join Date
    Feb 2010
    Gender
    male
    Location
    Between Both Worlds
    Posts
    8,868
    Reputation
    1021
    Thanks
    8,867
    My Mood
    Angelic
    /marked as solved

Similar Threads

  1. [Solved]bad syntax
    By sammysfat in forum Call of Duty Black Ops GSC Modding Help & Discussion
    Replies: 15
    Last Post: 01-15-2011, 09:01 PM
  2. Bad Syntax error..............
    By ~Just IN~ in forum Call of Duty Modern Warfare 2 Help
    Replies: 1
    Last Post: 10-26-2010, 11:55 PM
  3. [SOLVED]Script compile error (bad syntax)
    By Raffeman in forum Call of Duty Modern Warfare 2 Help
    Replies: 12
    Last Post: 08-25-2010, 07:41 PM
  4. [SOLVED]onplayerspawned(); Syntax Error
    By CainFool in forum Call of Duty Modern Warfare 2 Help
    Replies: 6
    Last Post: 08-25-2010, 09:56 AM
  5. Help.....! bad syntax error..
    By tjwjdqls75 in forum Call of Duty Modern Warfare 2 GSC Modding Help/Discussion
    Replies: 14
    Last Post: 07-23-2010, 08:29 PM