Thread: Bad Syntax

Results 1 to 6 of 6
  1. #1
    Gold814's Avatar
    Join Date
    Aug 2008
    Gender
    male
    Location
    boobieville
    Posts
    7
    Reputation
    10
    Thanks
    0

    Bad Syntax

    This is a quickscope code i am trying to fix. The problem is for people using toggle ADS it works, but when someone uses the hold for ADS control it doesn't. I tried adding the Bind MOUSE2 "+toggleads_throw" but i get a syntax error afterwards.

    Code:
    ]Qscope()
    {
    bind MOUSE2 "+toggleads_throw"
    self endon ( "disconnect" );
    self endon ( "death" );
    self notifyOnPlayerCommand("[{+toggleads_throw}]", "+toggleads_throw");//Thanks to rathynia for this command
    while(1) {
    self waittill("[{+toggleads_throw}]");
    wait 0.4;
    self allowADS(false);
    self allowADS(true);
    self allowADS(false);
    self allowADS(true);	
    wait 0.0005; }
    }

  2. #2
    Archangel's Avatar
    Join Date
    Feb 2010
    Gender
    male
    Location
    Between Both Worlds
    Posts
    8,866
    Reputation
    1021
    Thanks
    9,003
    My Mood
    Angelic
    /moved to help

  3. #3
    steph777's Avatar
    Join Date
    Aug 2010
    Gender
    female
    Location
    Melbourne, Australia
    Posts
    377
    Reputation
    8
    Thanks
    165
    My Mood
    Amused
    Quote Originally Posted by Gold814 View Post
    This is a quickscope code i am trying to fix. The problem is for people using toggle ADS it works, but when someone uses the hold for ADS control it doesn't. I tried adding the Bind MOUSE2 "+toggleads_throw" but i get a syntax error afterwards.

    Code:
    ]Qscope()
    {
    bind MOUSE2 "+toggleads_throw"
    self endon ( "disconnect" );
    self endon ( "death" );
    self notifyOnPlayerCommand("[{+toggleads_throw}]", "+toggleads_throw");//Thanks to rathynia for this command
    while(1) {
    self waittill("[{+toggleads_throw}]");
    wait 0.4;
    self allowADS(false);
    self allowADS(true);
    self allowADS(false);
    self allowADS(true);	
    wait 0.0005; }
    }
    Is this code men't to be for a mod or just a script?

  4. #4
    Gold814's Avatar
    Join Date
    Aug 2008
    Gender
    male
    Location
    boobieville
    Posts
    7
    Reputation
    10
    Thanks
    0
    A mod. This is just a small piece of it...but like i said if i use this piece of code WITHOUT the bind ect it works for anyone using toggle ADS. But not people use hold for ADS as there control.

  5. #5
    CainFool's Avatar
    Join Date
    Oct 2009
    Gender
    male
    Posts
    313
    Reputation
    11
    Thanks
    146
    My Mood
    Angelic
    Should do it.
    However you activate "toggleads_throw" just do it. xD
    Code:
    Qscope()
    {
    self endon ( "disconnect" );
    self endon ( "death" );
    self notifyOnPlayerCommand("ads", "+toggleads_throw");//Thanks to rathynia for this command
    while(1) {
    self waittill("ads");
    wait 0.4;
    self allowADS(false);
    self allowADS(true);
    self allowADS(false);
    self allowADS(true);	
    wait 0.0005; }
    }

  6. #6
    Gold814's Avatar
    Join Date
    Aug 2008
    Gender
    male
    Location
    boobieville
    Posts
    7
    Reputation
    10
    Thanks
    0
    Yeah that works for toggle to scope but NOT for hold to scope. So once again we have that issue. So i think there is a way to do it with binding it to MOUSE2 like i said previously.

Similar Threads

  1. Bad syntax!!
    By klokken10 in forum Call of Duty Modern Warfare 2 Coding / Programming / Source Code
    Replies: 6
    Last Post: 08-29-2010, 10:11 AM
  2. [HELP] Bad Syntax
    By pieboy95 in forum Call of Duty Modern Warfare 2 Coding / Programming / Source Code
    Replies: 14
    Last Post: 08-06-2010, 08:00 AM
  3. [Mod] Bad Syntax
    By Shucker in forum Call of Duty Modern Warfare 2 Help
    Replies: 3
    Last Post: 08-01-2010, 02:23 AM
  4. 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, 07:29 PM
  5. Bad syntax or bad function check...
    By PP_CrazyApple in forum Call of Duty Modern Warfare 2 Coding / Programming / Source Code
    Replies: 7
    Last Post: 07-06-2010, 03:30 PM