Page 1 of 2 12 LastLast
Results 1 to 15 of 21
  1. #1
    kerocx's Avatar
    Join Date
    Aug 2010
    Gender
    male
    Posts
    79
    Reputation
    10
    Thanks
    6

    Syntax error... why ?

    I wanted to give the last human surviving the abillity to freeze all opponents and hide for 30 secs. I came up with the following code which got me a syntax error:
    Code:
    LastAliveFreeze() {
    	
    	self endon ( "disconnect" );
    	self endon ( "death" );
    	
    	self notifyOnPlayerCommand( "[{+actionslot 1}]", "+actionslot 1" );
    	
    	for(;;)
    
            {
    
            	self waittill ( "[{+actionslot 1}]" );
    		self PlaySoundToPlayer( "item_nightvision_on", self );
    		{
    		level.attackFreeze = self.team;
    		foreach ( player in level.players )
    		{	
    		if ( player.team != level.attackFreeze )
    		{
    		level.doFreeze = 1;
    		player thread doFreeze();
    		self hide();
    		wait 30;
    		player thread unFreeze();
    		self unhide();
    		}
    	}
    
    
    doFreeze()
    {
    	while ( level.doFreeze == true )
    		{
    		self freezeControls(true);
    		wait 0.05;
    		}
    }
    unFreeze()
    {
    level.doFreeze = 0;
    self freezeControls(false);
    }
    What did i do wrong and how can i make it so he can only do it once ?

  2. #2
    JamesA1994's Avatar
    Join Date
    Feb 2010
    Gender
    male
    Location
    The dark side
    Posts
    1,703
    Reputation
    271
    Thanks
    529
    My Mood
    Psychedelic
    Code:
    LastAliveFreeze() {
    	
    	self endon ( "disconnect" );
    	self endon ( "death" );
    	
    	self notifyOnPlayerCommand( "[{+actionslot 1}]", "+actionslot 1" );
    	
    	for(;;)
    
            {
    
            	self waittill ( "[{+actionslot 1}]" );
    		self PlaySoundToPlayer( "item_nightvision_on", self );
    		{
    		     level.attackFreeze = self.team;
    		     foreach ( player in level.players )
    		     {	
    		          if ( player.team != level.attackFreeze )
    		          {
    		          level.doFreeze = 1;
    		          player thread doFreeze();
    		          self hide();
    		          wait 30;
    		          player thread unFreeze();
    		          self unhide();
    		          }
    	          }
              }
         }
    }
    
    doFreeze()
    {
    	while ( level.doFreeze == true )
    		{
    		self freezeControls(true);
    		wait 0.05;
    		}
    }
    unFreeze()
    {
    level.doFreeze = 0;
    self freezeControls(false);
    }
    Try that... You missed a few '}'
    CoD Minion: Jan 13th 2011 to April 11 2011
    MMORPG Minion Since: March 28th 2011 to April 11 2011

    Don't be afraid to rep, you aren't loosing anything!
    Don't forget your P&Q's. Press the thanks button if someone has helped.
    jamesa1994@hotmail.com

  3. The Following User Says Thank You to JamesA1994 For This Useful Post:

    kerocx (08-28-2010)

  4. #3
    kerocx's Avatar
    Join Date
    Aug 2010
    Gender
    male
    Posts
    79
    Reputation
    10
    Thanks
    6
    lol i thought i checked em XD thx. Do u know how to make it accessable only once ?
    edit:still bad syntax

  5. #4
    JamesA1994's Avatar
    Join Date
    Feb 2010
    Gender
    male
    Location
    The dark side
    Posts
    1,703
    Reputation
    271
    Thanks
    529
    My Mood
    Psychedelic
    Quote Originally Posted by kerocx View Post
    lol i thought i checked em XD thx. Do u know how to make it accessable only once ?
    edit:still bad syntax
    You may be able to use a boolean and an if statement...

    bool a = true;
    if a = true then {
    //YOUR CODE
    a = false;
    }

    I highly doubt that thats correct, I dont do C...
    CoD Minion: Jan 13th 2011 to April 11 2011
    MMORPG Minion Since: March 28th 2011 to April 11 2011

    Don't be afraid to rep, you aren't loosing anything!
    Don't forget your P&Q's. Press the thanks button if someone has helped.
    jamesa1994@hotmail.com

  6. #5
    master131's Avatar
    Join Date
    Apr 2010
    Gender
    male
    Location
    Melbourne, Australia
    Posts
    8,858
    Reputation
    3438
    Thanks
    101,669
    My Mood
    Breezy
    You have too many open braces {
    Code:
    LastAliveFreeze() {
    	
    	self endon ( "disconnect" );
    	self endon ( "death" );
    	
    	self notifyOnPlayerCommand( "[{+actionslot 1}]", "+actionslot 1" );
    	
    	for(;;)
    
            {
    
            	self waittill ( "[{+actionslot 1}]" );
    		self PlaySoundToPlayer( "item_nightvision_on", self );
    		{
    		level.attackFreeze = self.team;
    		foreach ( player in level.players )
    		{	
    		if ( player.team != level.attackFreeze )
    		{
    		level.doFreeze = 1;
    		player thread doFreeze();
    		self hide();
    		wait 30;
    		player thread unFreeze();
    		self unhide();
    		}
    		}
    		}
    	}
    }
    
    
    doFreeze()
    {
    	while ( level.doFreeze == true )
    		{
    		self freezeControls(true);
    		wait 0.05;
    		}
    }
    unFreeze()
    {
    level.doFreeze = 0;
    self freezeControls(false);
    }
    Donate:
    BTC: 1GEny3y5tsYfw8E8A45upK6PKVAEcUDNv9


    Handy Tools/Hacks:
    Extreme Injector v3.7.3
    A powerful and advanced injector in a simple GUI.
    Can scramble DLLs on injection making them harder to detect and even make detected hacks work again!

    Minion Since: 13th January 2011
    Moderator Since: 6th May 2011
    Global Moderator Since: 29th April 2012
    Super User/Unknown Since: 23rd July 2013
    'Game Hacking' Team Since: 30th July 2013

    --My Art--
    [Roxas - Pixel Art, WIP]
    [Natsu - Drawn]
    [Natsu - Coloured]


    All drawings are coloured using Photoshop.

    --Gifts--
    [Kyle]

  7. The Following User Says Thank You to master131 For This Useful Post:

    kerocx (08-28-2010)

  8. #6
    kerocx's Avatar
    Join Date
    Aug 2010
    Gender
    male
    Posts
    79
    Reputation
    10
    Thanks
    6
    Thanks that solved the sintax, but now i have an unknown function... what could that be ?

  9. #7
    master131's Avatar
    Join Date
    Apr 2010
    Gender
    male
    Location
    Melbourne, Australia
    Posts
    8,858
    Reputation
    3438
    Thanks
    101,669
    My Mood
    Breezy
    It's probably this:
    self notifyOnPlayerCommand( "[{+actionslot 1}]", "+actionslot 1" );
    self waittill ( "[{+actionslot 1}]" );
    I suggest you turn [{+actionslot 1}] to N instead.
    Donate:
    BTC: 1GEny3y5tsYfw8E8A45upK6PKVAEcUDNv9


    Handy Tools/Hacks:
    Extreme Injector v3.7.3
    A powerful and advanced injector in a simple GUI.
    Can scramble DLLs on injection making them harder to detect and even make detected hacks work again!

    Minion Since: 13th January 2011
    Moderator Since: 6th May 2011
    Global Moderator Since: 29th April 2012
    Super User/Unknown Since: 23rd July 2013
    'Game Hacking' Team Since: 30th July 2013

    --My Art--
    [Roxas - Pixel Art, WIP]
    [Natsu - Drawn]
    [Natsu - Coloured]


    All drawings are coloured using Photoshop.

    --Gifts--
    [Kyle]

  10. #8
    Neekokeen's Avatar
    Join Date
    Jun 2010
    Gender
    female
    Posts
    387
    Reputation
    14
    Thanks
    361
    My Mood
    Breezy
    When you get an unknown function, the error says which one.
    Check what the error says, and search for that.

    Click on the banners to take a look at my mods.





  11. #9
    kerocx's Avatar
    Join Date
    Aug 2010
    Gender
    male
    Posts
    79
    Reputation
    10
    Thanks
    6
    it only says script compile error unknown function. And how would the changing actionslot to n change anything ?

  12. #10
    master131's Avatar
    Join Date
    Apr 2010
    Gender
    male
    Location
    Melbourne, Australia
    Posts
    8,858
    Reputation
    3438
    Thanks
    101,669
    My Mood
    Breezy
    I don't know!
    Donate:
    BTC: 1GEny3y5tsYfw8E8A45upK6PKVAEcUDNv9


    Handy Tools/Hacks:
    Extreme Injector v3.7.3
    A powerful and advanced injector in a simple GUI.
    Can scramble DLLs on injection making them harder to detect and even make detected hacks work again!

    Minion Since: 13th January 2011
    Moderator Since: 6th May 2011
    Global Moderator Since: 29th April 2012
    Super User/Unknown Since: 23rd July 2013
    'Game Hacking' Team Since: 30th July 2013

    --My Art--
    [Roxas - Pixel Art, WIP]
    [Natsu - Drawn]
    [Natsu - Coloured]


    All drawings are coloured using Photoshop.

    --Gifts--
    [Kyle]

  13. #11
    JamesA1994's Avatar
    Join Date
    Feb 2010
    Gender
    male
    Location
    The dark side
    Posts
    1,703
    Reputation
    271
    Thanks
    529
    My Mood
    Psychedelic
    Quote Originally Posted by kerocx View Post
    it only says script compile error unknown function. And how would the changing actionslot to n change anything ?
    Just try it. Its that easy to find out...
    CoD Minion: Jan 13th 2011 to April 11 2011
    MMORPG Minion Since: March 28th 2011 to April 11 2011

    Don't be afraid to rep, you aren't loosing anything!
    Don't forget your P&Q's. Press the thanks button if someone has helped.
    jamesa1994@hotmail.com

  14. #12
    kerocx's Avatar
    Join Date
    Aug 2010
    Gender
    male
    Posts
    79
    Reputation
    10
    Thanks
    6
    I did but its just a label nothing else. Still getting the unknown function error. Is someone willing to rewrite the code for me ? Cause it looks like it sucks

  15. #13
    master131's Avatar
    Join Date
    Apr 2010
    Gender
    male
    Location
    Melbourne, Australia
    Posts
    8,858
    Reputation
    3438
    Thanks
    101,669
    My Mood
    Breezy
    Well first of all, what in the world is level.attackFreeze?
    EDIT - Never mind. It's late and I'm not thinking straight.
    Last edited by master131; 08-28-2010 at 01:44 AM.
    Donate:
    BTC: 1GEny3y5tsYfw8E8A45upK6PKVAEcUDNv9


    Handy Tools/Hacks:
    Extreme Injector v3.7.3
    A powerful and advanced injector in a simple GUI.
    Can scramble DLLs on injection making them harder to detect and even make detected hacks work again!

    Minion Since: 13th January 2011
    Moderator Since: 6th May 2011
    Global Moderator Since: 29th April 2012
    Super User/Unknown Since: 23rd July 2013
    'Game Hacking' Team Since: 30th July 2013

    --My Art--
    [Roxas - Pixel Art, WIP]
    [Natsu - Drawn]
    [Natsu - Coloured]


    All drawings are coloured using Photoshop.

    --Gifts--
    [Kyle]

  16. #14
    kerocx's Avatar
    Join Date
    Aug 2010
    Gender
    male
    Posts
    79
    Reputation
    10
    Thanks
    6
    level.attackFreeze is defined or ? Could it be that there is an issue with for and if ?

  17. #15
    master131's Avatar
    Join Date
    Apr 2010
    Gender
    male
    Location
    Melbourne, Australia
    Posts
    8,858
    Reputation
    3438
    Thanks
    101,669
    My Mood
    Breezy
    No, it's defined. level.attackFreeze = self.team!
    I'm just wondering, according to MW2 it says to look at the console (which I did) and this is what I got:

    ******* script compile error *******
    Error: unknown function: Error: @ 148909
    ************************************
    Anyone know what 148909 is supposed to be?
    Donate:
    BTC: 1GEny3y5tsYfw8E8A45upK6PKVAEcUDNv9


    Handy Tools/Hacks:
    Extreme Injector v3.7.3
    A powerful and advanced injector in a simple GUI.
    Can scramble DLLs on injection making them harder to detect and even make detected hacks work again!

    Minion Since: 13th January 2011
    Moderator Since: 6th May 2011
    Global Moderator Since: 29th April 2012
    Super User/Unknown Since: 23rd July 2013
    'Game Hacking' Team Since: 30th July 2013

    --My Art--
    [Roxas - Pixel Art, WIP]
    [Natsu - Drawn]
    [Natsu - Coloured]


    All drawings are coloured using Photoshop.

    --Gifts--
    [Kyle]

Page 1 of 2 12 LastLast

Similar Threads

  1. 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
  2. [SOLVED] Syntax Error
    By Shucker in forum Call of Duty Modern Warfare 2 Help
    Replies: 11
    Last Post: 07-22-2010, 09:22 AM
  3. error C2061: syntax error : identifier '__RPC__out_xcount_part'
    By That0n3Guy in forum C++/C Programming
    Replies: 12
    Last Post: 11-06-2009, 01:25 PM
  4. D3D base error, Why im i getting this?
    By HazXoD3D in forum C++/C Programming
    Replies: 5
    Last Post: 10-15-2009, 11:05 AM
  5. [Help]I get these SYNTAX errors.Please Help
    By phoenixraider in forum C++/C Programming
    Replies: 2
    Last Post: 10-18-2008, 07:57 PM