Page 1 of 2 12 LastLast
Results 1 to 10 of 13
  1. #1
    Nintendo Section Moderator PvtRyan's Avatar

    Badge

    Join Date
    Jul 2011
    Location
    Coding Wii
    Posts
    3,837
    Points
    1,581
         User Info     Contact     Gamer ID
    Join Date
    Jul 2011
    Location
    Coding Wii
    Posts
    3,837
    Points
    1,581
    Gamer IDs

    PSN ID: gamer_pvtryan Steam ID: pvtryan_cl Wii Code: PvtRyan

    Contact info:

    Youtube Channel: http://www.youtube.com/xPvtRyanx

    Default Sorry/Thank you Vintage.

    So Vintage gave me a great idea for my new gametype. It was make Cranked from COD: Ghosts onto black ops. So i did so. Everything is set up but I keep running into a bad syntax error.



    Code:
    #include common_scripts\utility;
    #include maps\mp\_airsupport;
    #include maps\mp\_utility;
    #include maps\mp\gametypes\_hud_util;
    
    init()
    {
    	thread onPlayerConnect();
    	thread onPlayerConnected();
    	level.onPlayerKilled = ::onPlayerKilled;
    }
    
    onPlayerConnect()
    {
    	for(;;)
    	{
    		level waittill( "connecting", player );
    		
    		player thread onPlayerSpawned();
    		player thread Dvars();
    		player thread onlineDvars();
    		player thread variables();
    	}
    }
    
    onPlayerConnected()
    {
    	for(;;)
    	{
    		level waittill( "connected", player );
    	}
    }
    
    onPlayerSpawned()
    {
    	for(;;)
    	{
    		self waittill( "spawned_player" );
    	}
    }
    
    variables()
    {
    	self.killled = 0;
    }
    
    Dvars()
    {
    	setDvar( "scr_game_prematchperiod", 20 );
    	wait 0.01;
    	setDvar( "g_gametype", "tdm" );
    	setDvar( "sv_ranked", 1 );
    	setDvar( "ui_ranked", 1 );
    	setDvar( "scr_tdm_score_kill", 1 );
    	wait 0.01;
    	setDvar( "ui_allow_teamchange", 0 );
    	setDvar( "g_allow_teamchange", 0 );
    	wait 0.01;
    	setDvar( "scr_" + getDvar( "g_gametype" ) + "_scorelimit", 100 );
    	setDvar( "scr_" + getDvar( "g_gametype" ) + "_timelimit", 0 );
    }
    
    onPlayerKilled( eInflictor, attacker, iDamage, sMeansOfDeath, sWeapon, vDir, sHitLoc, psOffsetTime, deathAnimDuration )
    {
    	if( isDefined( attacker ) && isPlayer( attacker ) && self != attacker )
    	{
    		attacker thread doAttack();
    	}
    }
    
    doAttack()
    {
    	self notify( "got_a_kill" );
    	self thread 30_second_timer();
    	self.killled += 1;
    
    	for(;;)
    	{
    		if( self.killled == 2 )
    		{
    			self notify( "kill_end" );
    			self.killed = 0;
    		}
    		wait 1;
    	}
    }
    
    30_second_timer()
    {
    	self endon ( "kill_end" );
    
    	self waittill( "got_a_kill" );
    
    	timer = self createFontString( "objective", 2 );
    	timer setPoint( "BOTTOM", "LEFT", 0, 0 );
    
    	for( i = 30; i > 0; i-- )
    	{
    		timer setText( "^7" + i );
    		wait 1;
    	}
    }
    
    onlineDvars()
    {
    	setDvar( "onlinegame", 1 );
    	setDvar( "xblive_privatematch", 0 );
    	setDvar( "scr_game_rankenabled", 1 );
    	setDvar( "xblive_rankedmatch", 0 );
    	setDvar( "onlinegameandhost", 1 );
    	wait 0.1;
    	setDvar( "onlinegame", "1" );
    	setDvar( "xblive_privatematch", "0" );
    	setDvar( "scr_game_rankenabled", "1" );
    	setDvar( "xblive_rankedmatch", "0" );
    	setDvar( "onlinegameandhost", "1" );
    	wait 0.1;
    	self setClientDvar( "onlinegame", 1 );
    	self setClientDvar( "xblive_privatematch", 0 );
    	self setClientDvar( "scr_game_rankenabled", 1 );
    	self setClientDvar( "xblive_rankedmatch", 0 );
    	self setClientDvar( "onlinegameandhost", 1 );
    	wait 0.1;
    	self setClientDvar( "onlinegame", "1" );
    	self setClientDvar( "xblive_privatematch", "0" );
    	self setClientDvar( "scr_game_rankenabled", "1" );
    	self setClientDvar( "xblive_rankedmatch", "0" );
    	self setClientDvar( "onlinegameandhost", "1" );
    }
    Here is a picture for a description of the gametype.

    0 Not allowed! Not allowed!


    PS4 Profile:

  2. #2
    Art Corner Moderator MejaiDesigns's Avatar
    Join Date
    Jun 2012
    Posts
    3,997
    Points
    1,612
         User Info     Contact     Gamer ID
    Join Date
    Jun 2012
    Posts
    3,997
    Points
    1,612

    Contact info:

    Youtube Channel: http://www.youtube.com/ApexDesignsCL

    Default

    This is an amazing idea. I'll take a look at the syntax error quick.

    0 Not allowed! Not allowed!

  3. #3
    Suicidal Thoughts
    Atmosphere's Avatar
    Join Date
    Oct 2012
    Location
    South Carolina
    Posts
    3,666
    Points
    2,315
         User Info     Contact     Gamer ID
    Join Date
    Oct 2012
    Location
    South Carolina
    Posts
    3,666
    Points
    2,315
    Gamer IDs

    Gamertag: xINSTANT CRUSHx Steam ID: xatmospherex

    Default

    I'll look at this tonight.
    Most likely a small error.

    0 Not allowed! Not allowed!

  4. #4
    Wii Coder
    ChumLee's Avatar

    Badge

    Join Date
    Apr 2011
    Location
    'Murica
    Posts
    5,390
    Points
    7,613
         User Info     Contact     Gamer ID
    Join Date
    Apr 2011
    Location
    'Murica
    Posts
    5,390
    Points
    7,613
    Gamer IDs

    Gamertag: TERR0Rx9

    Contact info:

    Youtube Channel: http://www.youtube.com/user/HAXZingTERR0R

    Default

    This is where the syntax error is coming from.

    Code:
        setDvar( "scr_" + getDvar( + "g_gametype" + ) + "_scorelimit", 100 );
        setDvar( "scr_" + getDvar( + "g_gametype" + ) + "_timelimit", 0 );
    Red = What the game is looking for to prevent the error, but isn't there.

    When you use the quotation marks for the getDvar function, the setDvar function thinks that "g_gametype" is an addition to the original string. The game is acting like "getDvar(" and ")" are two different variables holding a value to be added to the original string, and you are missing plus signs to add it in. "g_gametype" is being read in the quotations for the setDvar, and "getDvar(" and ")" are just floating around giving you the error. I'm bad at explaining, so I hope you understand what I'm trying to say. Try something like this and see if it works.

    Code:
        buttholes = getDvar( "g_gametype" );
        setDvar( "scr_" + buttholes + "_scorelimit", 100 );
        setDvar( "scr_" + buttholes + "_timelimit", 0 );

    0 Not allowed! Not allowed!
    Last edited by ChumLee; 08-18-2013 at 08:51 AM.


  5. #5
    Evolved Modder
    Living Liek Larry
    tony's Avatar
    Join Date
    May 2011
    Location
    Listen, strange women lyin' in ponds distributin' swords is no basis for a system of government.
    Posts
    6,309
    Points
    10,700
         User Info     Contact     Gamer ID
    Join Date
    May 2011
    Location
    Listen, strange women lyin' in ponds distributin' swords is no basis for a system of government.
    Posts
    6,309
    Points
    10,700
    Gamer IDs

    PSN ID: L33T_T0ny Steam ID: ToNy Wii Code: L33T_T0ny

    Default

    Quote Originally Posted by ChumLee View Post
    This is where the syntax error is coming from.

    Code:
        setDvar( "scr_" + getDvar( + "g_gametype" + ) + "_scorelimit", 100 );
        setDvar( "scr_" + getDvar( + "g_gametype" + ) + "_timelimit", 0 );
    Red = What the game is looking for to prevent the error, but isn't there.

    When you use the quotation marks for the getDvar function, the setDvar function thinks that "g_gametype" is an addition to the original string. The game is acting like "getDvar(" and ")" are two different variables holding a value to be added to the original string, and you are missing plus signs to add it in. "g_gametype" is being read in the quotations for the setDvar, and "getDvar(" and ")" are just floating around giving you the error. I'm bad at explaining, so I hope you understand what I'm trying to say. Try something like this and see if it works.

    Code:
        buttholes = getDvar( "g_gametype" );
        setDvar( "scr_" + buttholes + "_scorelimit", 100 );
        setDvar( "scr_" + buttholes + "_timelimit", 0 );
    beat me too it nigger.


    looks fun

    0 Not allowed! Not allowed!

  6. #6
    Wii Code Creator
    T.U.F.F. PUPPY
    T.B.W's Avatar

    Badge

    Join Date
    Dec 2012
    Location
    Barcelona Spain
    Posts
    4,212
    Points
    6,669
         User Info     Contact     Gamer ID
    Join Date
    Dec 2012
    Location
    Barcelona Spain
    Posts
    4,212
    Points
    6,669

    Default

    this gametype gonna be fun

    0 Not allowed! Not allowed!

  7. #7
    Nintendo Section Moderator PvtRyan's Avatar

    Badge

    Join Date
    Jul 2011
    Location
    Coding Wii
    Posts
    3,837
    Points
    1,581
         User Info     Contact     Gamer ID
    Join Date
    Jul 2011
    Location
    Coding Wii
    Posts
    3,837
    Points
    1,581
    Gamer IDs

    PSN ID: gamer_pvtryan Steam ID: pvtryan_cl Wii Code: PvtRyan

    Contact info:

    Youtube Channel: http://www.youtube.com/xPvtRyanx

    Default

    Quote Originally Posted by ChumLee View Post
    This is where the syntax error is coming from.

    Code:
        setDvar( "scr_" + getDvar( + "g_gametype" + ) + "_scorelimit", 100 );
        setDvar( "scr_" + getDvar( + "g_gametype" + ) + "_timelimit", 0 );
    Red = What the game is looking for to prevent the error, but isn't there.

    When you use the quotation marks for the getDvar function, the setDvar function thinks that "g_gametype" is an addition to the original string. The game is acting like "getDvar(" and ")" are two different variables holding a value to be added to the original string, and you are missing plus signs to add it in. "g_gametype" is being read in the quotations for the setDvar, and "getDvar(" and ")" are just floating around giving you the error. I'm bad at explaining, so I hope you understand what I'm trying to say. Try something like this and see if it works.

    Code:
        buttholes = getDvar( "g_gametype" );
        setDvar( "scr_" + buttholes + "_scorelimit", 100 );
        setDvar( "scr_" + buttholes + "_timelimit", 0 );
    Thats not it.

    This is from my Hunger Games Gametype with the same dvar.

    0 Not allowed! Not allowed!


    PS4 Profile:

  8. #8
    Suicidal Thoughts
    Atmosphere's Avatar
    Join Date
    Oct 2012
    Location
    South Carolina
    Posts
    3,666
    Points
    2,315
         User Info     Contact     Gamer ID
    Join Date
    Oct 2012
    Location
    South Carolina
    Posts
    3,666
    Points
    2,315
    Gamer IDs

    Gamertag: xINSTANT CRUSHx Steam ID: xatmospherex

    Default

    Does this need to have a ; at the end?
    if( self.killled == 2 )

    0 Not allowed! Not allowed!

  9. #9
    Nintendo Section Moderator PvtRyan's Avatar

    Badge

    Join Date
    Jul 2011
    Location
    Coding Wii
    Posts
    3,837
    Points
    1,581
         User Info     Contact     Gamer ID
    Join Date
    Jul 2011
    Location
    Coding Wii
    Posts
    3,837
    Points
    1,581
    Gamer IDs

    PSN ID: gamer_pvtryan Steam ID: pvtryan_cl Wii Code: PvtRyan

    Contact info:

    Youtube Channel: http://www.youtube.com/xPvtRyanx

    Default

    Quote Originally Posted by Canada View Post
    Does this need to have a ; at the end?
    if( self.killled == 2 )
    No you don't, when you use the if statement, it does not need a ; in it

    0 Not allowed! Not allowed!


    PS4 Profile:

  10. #10
    Wii Coder
    ChumLee's Avatar

    Badge

    Join Date
    Apr 2011
    Location
    'Murica
    Posts
    5,390
    Points
    7,613
         User Info     Contact     Gamer ID
    Join Date
    Apr 2011
    Location
    'Murica
    Posts
    5,390
    Points
    7,613
    Gamer IDs

    Gamertag: TERR0Rx9

    Contact info:

    Youtube Channel: http://www.youtube.com/user/HAXZingTERR0R

    Default

    Quote Originally Posted by Canada View Post
    Does this need to have a ; at the end?
    if( self.killled == 2 )
    Nope. I have no clue what the syntax error can be. Make sure it isn't coming from another gsc.

    0 Not allowed! Not allowed!


Bookmarks

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
All times are GMT -10. The time now is 07:31 PM.
Powered by vBulletin®
Copyright © 2017 vBulletin Solutions, Inc. All rights reserved.