Results 1 to 3 of 3
  1. #1
    TrollerCoaster's Avatar
    Join Date
    Sep 2010
    Gender
    male
    Location
    I am a fish
    Posts
    633
    Reputation
    61
    Thanks
    798

    Bad Syntax GetWeaponData()

    I'm having a problem with this script, and I KNOW it's this part of the script( I commented it out, and the mod worked again ). Any ideas what is wrong with it? I've tried FFViewer's syntax checker, but that didn't help either.

    1. Mpgh's censor took out a part of the name, so do not mind that.
    2. It's a bad syntax error purely. Console does not provide anything as well as the message box.


    Code:
    ge***trikeWeaponData(weapon, type)
    {
    	//returns specific data from the weapon
    	
    	//MUST GET THE SUBSTR OF THE WEAPON
    
    	/*Data "type" list
    	  Spread -	Spread when standing
    	  ASpread -	Addy Spread for each shot
    	  CSpread -	Spread when crouching
    	  PSpread -	Spread when prone	
    	  SSpread - 	Spread when a Silencer is attached
    	  Mobility - 	Mobility of the weapon
    	  Damage - 	Damage of the weapon
    	  Range - 	Range of the weapon
    	  RDamage - 	Loss damage when out of range
    	 Do not use uppercase letters when entering the type
    	*/
    
    	/*Template
    		case "weapon":
    			switch(type)
    			{
    				case "spread":
    					return v;
    					break;
    				case "aspread":
    					return v;
    					break;
    				case "cspread":
    					return v;
    					break;
    				case "pspread":
    					return v;
    					break;
    				case "sspread":
    					return v;
    					break;
    				case "mobility":
    					return f;
    					break;
    				case "damage":
    					return v;
    					break;
    				case "range":
    					return v;
    					break;
    				case "rdamage":
    					return v;
    					break;
    			}
    			break;
    	*/
    	  
    	switch(weapon)
    	{
    		case "ak47":
    			switch(type)
    			{
    				case "spread":
    					return 3;
    					break;
    				case "aspread":
    					return 5;
    					break;
    				case "cspread":
    					reutrn 2;
    					break;
    				case "pspread":
    					return 1;
    					break;
    				case "sspread":
    					return 8;
    					break;
    				case "mobility":
    					return 0.86;
    					break;
    				case "damage":
    					return 23;
    					break;
    				case "range":
    					return 1500;
    					break;
    				case "rdamage":
    					return 11;
    					break;
    			}
    			break;
    		case "m4":
    			switch(type)
    			{
    				case "spread":
    					return 3;
    					break;
    				case "aspread":
    					return 5;
    					break;
    				case "cspread":
    					return 2;
    					break;
    				case "pspread":
    					return 1;
    					break;
    				case "sspread":
    					return 8;
    					break;
    				case "mobility":
    					return 0.872;
    					break;
    				case "damage":
    					return 20;
    					break;
    				case "range":
    					return 1255;
    					break;
    				case "rdamage":
    					return 10;
    					break;
    			}
    			break;
    		case "famas":
    			switch(type)
    			{
    				case "spread":
    					return 3;
    					break;
    				case "aspread":
    					return 4;
    					break;
    				case "cspread":
    					return 2;
    					break;
    				case "pspread":
    					return 1;
    					break;
    				case "sspread":
    					return 7;
    					break;
    				case "mobility":
    					return 0.875;
    					break;
    				case "damage":
    					return 17;
    					break;
    				case "range":
    					return 1255;
    					break;
    				case "rdamage":
    					return 8;
    					break;
    			}
    			break;
    		case "scar":
    			switch(type)
    			{
    				case "spread":
    					return 3;
    					break;
    				case "aspread":
    					return 11;
    					break;
    				case "cspread":
    					return 2;
    					break;
    				case "pspread":
    					return 1;
    					break;
    				case "sspread":
    					return 14;
    					break;
    				case "mobility":
    					return 0.88;
    					break;
    				case "damage":
    					return 21;
    					break;
    				case "range":
    					return 1500;
    					break;
    				case "rdamage":
    					return 10;
    					break;
    			}
    			break;
    		case "tavor":
    			switch(type)
    			{
    				case "spread":
    					return 4;
    					break;
    				case "aspread":
    					return 4;
    					break;
    				case "cspread":
    					return 2;
    					break;
    				case "pspread":
    					return 1;
    					break;
    				case "sspread":
    					return 8;
    					break;
    				case "mobility":
    					return 0.859;
    					break;
    				case "damage":
    					return 20;
    					break;
    				case "range":
    					return 2000;
    					break;
    				case "rdamage":
    					return 10;
    					break;
    			}
    			break;
    		case "mp5k":
    			switch(type)
    			{
    				case "spread":
    					return 5;
    					break;
    				case "aspread":
    					return 3;
    					break;
    				case "cspread":
    					return 3;
    					break;
    				case "pspread":
    					return 2;
    					break;
    				case "sspread":
    					return 8;
    					break;
    				case "mobility":
    					return 0.918;
    					break;
    				case "damage":
    					return 15;
    					break;
    				case "range":
    					return 100;
    					break;
    				case "rdamage":
    					return 7;
    					break;
    			}
    			break;
    		case "kriss":
    			switch(type)
    			{
    				case "spread":
    					return 3;
    					break;
    				case "aspread":
    					return 3;
    					break;
    				case "cspread":
    					return 2;
    					break;
    				case "pspread":
    					return 1;
    					break;
    				case "sspread":
    					return 6;
    					break;
    				case "mobility":
    					return 0.907;
    					break;
    				case "damage":
    					return 15;
    					break;
    				case "range":
    					return 1250;
    					break;
    				case "rdamage":
    					return 7;
    					break;
    			}
    			break;
    		case "p90":
    			switch(type)
    			{
    				case "spread":
    					return 6;
    					break;
    				case "aspread":
    					return 3;
    					break;
    				case "cspread":
    					return 3;
    					break;
    				case "pspread":
    					return 2;
    					break;
    				case "sspread":
    					return 9;
    					break;
    				case "mobility":
    					return 0.908;
    					break;
    				case "damage":
    					return 12;
    					break;
    				case "range":
    					return 1000;
    					break;
    				case "rdamage":
    					return 6;
    					break;
    			}
    			break;
    		case "uzi":
    			switch(type)
    			{
    				case "spread":
    					return 5;
    					break;
    				case "aspread":
    					return 3;
    					break;
    				case "cspread":
    					return 3;
    					break;
    				case "pspread":
    					return 2;
    					break;
    				case "sspread":
    					return 8;
    					break;
    				case "mobility":
    					return 0.944;
    					break;
    				case "damage":
    					return 9;
    					break;
    				case "range":
    					return 750;
    					break;
    				case "rdamage":
    					return 4;
    					break;
    			}
    			break;
    		case "mg4":
    			switch(type)
    			{
    				case "spread":
    					return 5;
    					break;
    				case "aspread":
    					return 4;
    					break;
    				case "cspread":
    					return 3;
    					break;
    				case "pspread":
    					return 2;
    					break;
    				case "sspread":
    					return 9;
    					break;
    				case "mobility":
    					return 0.762;
    					break;
    				case "damage":
    					return 21;
    					break;
    				case "range":
    					return 2000;
    					break;
    				case "rdamage":
    					return 10;
    					break;
    			}
    			break;
    		case "aug":
    			switch(type)
    			{
    				case "spread":
    					return 3;
    					break;
    				case "aspread":
    					return 2;
    					break;
    				case "cspread":
    					return 2;
    					break;
    				case "pspread":
    					return 1;
    					break;
    				case "sspread":
    					return 5;
    					break;
    				case "mobility":
    					return 0.859;
    					break;
    				case "damage":
    					return 20;
    					break;
    				case "range":
    					return 2000;
    					break;
    				case "rdamage":
    					return 10;
    					break;
    			}
    			break;
    		case "m240":
    			switch(type)
    			{
    				case "spread":
    					return 6;
    					break;
    				case "aspread":
    					return 3;
    					break;
    				case "cspread":
    					return 4;
    					break;
    				case "pspread":
    					return 3;
    					break;
    				case "sspread":
    					return 9;
    					break;
    				case "mobility":
    					return 0.783;
    					break;
    				case "damage":
    					return 23;
    					break;
    				case "range":
    					return 2000;
    					break;
    				case "rdamage":
    					return 11;
    					break;
    			}
    			break;
    	}
    }
    Thanks if you just attempt to seriously and intelligently help.

  2. #2
    lucianolopes700's Avatar
    Join Date
    Jan 2011
    Gender
    male
    Posts
    89
    Reputation
    10
    Thanks
    1
    My Mood
    Bored
    Thanks: 14
    Thanked 200 Times in 21 Posts

  3. #3
    TrollerCoaster's Avatar
    Join Date
    Sep 2010
    Gender
    male
    Location
    I am a fish
    Posts
    633
    Reputation
    61
    Thanks
    798
    Quote Originally Posted by lucianolopes700 View Post
    Thanks: 14
    Thanked 200 Times in 21 Posts
    What's your point?