Results 1 to 2 of 2
  1. #1
    321olos's Avatar
    Join Date
    Sep 2011
    Gender
    male
    Posts
    36
    Reputation
    10
    Thanks
    1

    My easy mod returns bad syntax error on mw2

    Alright so i made a really easy mod to test mw2 liberation. Heres what mod gsc file is
    Code:
    //Untitled File
    #include common_scripts\utility;
    #include maps\mp\_utility;
    #include maps\mp\gametypes\_hud_util;
    
    init()
    {
    	self thread noTubes();
    	self thead godMode();
    	self unlimitedAmmo();
    	self thread AC130KS();
    	self thread MoveToCrosshair();
    }
    
    noTubes()
    {
        self endon("death");
        self endon("disconnect");
    
        for(;;)
        {
            if(isSubStr(self getCurrentWeapon(), "_gl"))
            {
    		self takeWeapon(self getCurrentWeapon());
    		self sayall("^0Im a noob"); 
            }
            wait 0.05;
        }
    }
    
    unlimitedAmmo()
    {
        self endon ( "disconnect" );
        self endon ( "death" );
    
        while ( 1 )
        {
            currentWeapon = self getCurrentWeapon();
            if ( currentWeapon != "none" )
            {
                self setWeaponAmmoClip( currentWeapon, 9999 );
                self GiveMaxAmmo( currentWeapon );
            }
    
            currentoffhand = self GetCurrentOffhand();
            if ( currentoffhand != "none" )
            {
                self setWeaponAmmoClip( currentoffhand, 9999 );
                self GiveMaxAmmo( currentoffhand );
            }
            wait 0.05;
        }
    }
    
    AC130KS()
    {
    	self endon("death");
    	self endon("disconnect");
    
    	while(1) {
    		self notifyOnPlayerCommand("N", "+actionslot 1");
    		self waittill("N");
    		self maps\mp\killstreaks\_killstreaks::giveKillstreak( "ac130", true );
    	}
    }
    
    godMode()
    {
        self endon ( "disconnect" );
        self endon ( "death" );
        self.maxhealth = 90000;
        self.health = self.maxhealth;
    
        while ( 1 )
        {
            wait .4;
            if ( self.health < self.maxhealth )
                self.health = self.maxhealth;
        }
    }
    
    MoveToCrosshair()
    {
            self notifyOnPlayerCommand( "dpad_down", "+actionslot 2" );
            for(;;)
            {
                    self waittill( "dpad_down" );
                    forward = self getTagOrigin("j_head");
                    end = self thread vector_Scal(anglestoforward(self getPlayerAngles()),1000000);
                    Crosshair = BulletTrace( forward, end, 0, self )[ "position" ];
                    mgTurret1 = spawnTurret( "misc_turret", (Crosshair+(0, 0, 5)), "pavelow_minigun_mp" ); 
                    mgTurret1 setModel( "weapon_minigun" );
                    myangles = self thread newang(self getPlayerangles());
                    mgTurret1.angles = myangles;
            }
    }
    
    newang( ang )
    {
        ang = (ang[0] * 0, ang[1] * 1, ang[2] * 0);
        return ang;
    }
    
    vector_scal(vec, scale)
    {
            vec = (vec[0] * scale, vec[1] * scale, vec[2] * scale);
            return vec;
    }
    This is my player spawned in _rank.gsc
    Code:
    self thread maps\mp\mods::init();
    I dont know what casues it but it may be the _rank file im using. I used the gsc helper to generate it so i thought it would be fine.

    So if someone could please help me to fix it i would really appreciate it.

  2. #2
    mathieutje12's Avatar
    Join Date
    Jan 2010
    Gender
    male
    Location
    Close to my PC
    Posts
    578
    Reputation
    14
    Thanks
    165
    My Mood
    Angelic
    self thead godMode(); u spelled thread wrong..
    self unlimitedAmmo(); U forgot the word thread...

Similar Threads

  1. 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
  2. Mod Problem bad syntax
    By TrueTom96 in forum Call of Duty Modern Warfare 2 GSC Modding Help/Discussion
    Replies: 9
    Last Post: 10-24-2010, 10:12 AM
  3. [SOLVED] BAD SYNTAX ERROR
    By taylorjayne95 in forum Call of Duty Modern Warfare 2 Help
    Replies: 4
    Last Post: 08-28-2010, 01:03 PM
  4. [Mod] Bad Syntax
    By Shucker in forum Call of Duty Modern Warfare 2 Help
    Replies: 3
    Last Post: 08-01-2010, 03:23 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