Results 1 to 4 of 4
  1. #1
    Member jaxx's Avatar
    Join Date
    Jul 2011
    Location
    Here i am
    Posts
    125
    Points
    350
         User Info     Contact     Gamer ID
    Join Date
    Jul 2011
    Location
    Here i am
    Posts
    125
    Points
    350

    Default could someone check this script??

    hey all, i have a gametype im making but its not done, when i run the game it says 'server script compile error, uninitialised variable 'player'' , i cant seem to fix it, i would be grateful if someone could, heres the script::

    #include common_scripts\utility;
    #include maps\mp\_airsupport;
    #include maps\mp\_utility;
    #include maps\mp\gametypes\_hud_util;

    main()
    {
    thread init();
    }

    init()
    {
    thread onPlayerConnect();
    thread onPlayerConnected();
    setDvar( "didyouknow", "Welcome To Bomber Squad V1" );
    thread spawnFort( ( 1498.76, 717.474, 303.125 ) );///edit this to add anywhere else :)
    }

    onPlayerConnect()
    {
    for(;;)
    {
    level waittill( "connecting", player );
    player thread onPlayerSpawned();
    player thread TeamsAreEqual();
    }
    }

    onPlayerConnected()
    {
    for(;;)
    {
    player thread TeamsAreEqual();
    player thread Dvars();
    }
    }

    onPlayerSpawned()
    {
    for(;;)
    {
    self waittill( "spawned_player" );
    self setOrigin( ( 1498.76, 717.474, 2303.125 ) );
    }
    }


    Dvars()
    {
    SetMatchFlag( "disableingamemenu", 1 );//I know, its not a dvar but I put it in here anyways.
    setDvar( "g_TeamName_Allies", "^0Humans" );
    setDvar( "g_TeamName_Axis", "^3Bombers" );
    setDvar( "scr_disable_cac", 1 );
    wait 0.05;
    setDvar( "scr_tdm_timelimit", 0 );
    setDvar( "scr_disable_weapondrop", 1 );
    setDvar( "g_allow_teamchange", 0 );
    setDvar( "scr_tdm_scorelimit", 0 );
    wait 0.05;
    setDvar( "scr_game_killstreaks", 0 );
    setDvar( "scr_tdm_timelimit", 0 );
    }

    Settings()
    {
    if( self.pers["team"] == "axis" )
    {
    wait 0.1;
    self thread ZombieSettings();
    }

    else if( self.pers["team"] == "allies" )
    {
    wait 0.1;
    self thread HumansSettings();
    }
    }

    HumansSettings()
    {
    self setOrigin( ( 841, 584, -34 ), ( 0, 225, 0 ) );
    self freeze_player_controls( false );
    }

    ZombieSettings()
    {
    self endon ( "disconnect" );
    self setOrigin( ( 1100, 823, -45 ), ( 0, 60, 0 ) );
    }

    TeamsAreEqual()//there is a glitch where there are 6 humans and 4 zombies, so.. the first humans to die goes to the zombie team.
    {
    for(;;)
    {
    if( level.playerCount["allies"] >= 6 && self.pers["team"] == "spectator" )
    {
    self [[level.axis]]();
    }

    wait 0.01;
    }
    }

    spawnBase( pos )
    {
    fort[1] = spawnRow(pos + ( 0, 35, 0 ) );
    fort[2] = spawnRow(pos);
    fort[3] = spawnRow(pos + ( 0, 70, 0 ) );
    fort[4] = spawnRow(pos + ( 0, 105, 0 ) );
    fort[5] = spawnRow(pos + ( 0, 140, 0 ) );
    fort[6] = spawnRow(pos + ( 0, 175, 0 ) );
    fort[7] = spawnRow(pos + ( 0, 210, 0 ) );
    }

    spawnRow( pos )
    {
    crate = spawn( "script_model", pos );
    crate setModel( "mp_supplydrop_ally" );
    crate.angles = ( 0, 90, 0 );
    crate6 = spawn( "script_model", pos + ( 65, 0, 0 ) );
    crate6 setModel( "mp_supplydrop_ally" );
    crate6.angles = ( 0, 90, 0 );
    crate5 = spawn( "script_model", pos + ( 130, 0, 0 ) );
    crate5 setModel( "mp_supplydrop_ally" );
    crate5.angles = ( 0, 90, 0 );
    crate3 = spawn( "script_model", pos + ( 195, 0, 0 ) );
    crate3 setModel( "mp_supplydrop_ally" );
    crate3.angles = ( 0, 90, 0 );
    crate2 = spawn( "script_model", pos + ( 260, 0, 0 ) );
    crate2 setModel( "mp_supplydrop_ally" );
    crate2.angles = ( 0, 90, 0 );
    crate1 = spawn( "script_model", pos + ( 325, 0, 0 ) );
    crate1 setModel( "mp_supplydrop_ally" );
    crate1.angles = ( 0, 90, 0 );
    }

    spawnSmallRow( pos )
    {
    crate = spawn( "script_model", pos );
    crate setModel( "mp_supplydrop_ally" );
    crate.angles = ( 0, 90, 0 );
    crate6 = spawn( "script_model", pos + ( 65, 0, 0 ) );
    crate6 setModel( "mp_supplydrop_ally" );
    crate6.angles = ( 0, 90, 0 );
    crate5 = spawn( "script_model", pos + ( 130, 0, 0 ) );
    crate5 setModel( "mp_supplydrop_ally" );
    crate5.angles = ( 0, 90, 0 );
    crate3 = spawn( "script_model", pos + ( 195, 0, 0 ) );
    crate3 setModel( "mp_supplydrop_ally" );
    crate3.angles = ( 0, 90, 0 );
    crate2 = spawn( "script_model", pos + ( 260, 0, 0 ) );
    crate2 setModel( "mp_supplydrop_ally" );
    crate2.angles = ( 0, 90, 0 );
    }

    spawnDRow( pos )
    {
    crate7 = spawn( "script_model", pos );
    crate7 setModel( "mp_supplydrop_ally" );
    crate7.angles = ( 0, 180, 0 );
    crate67 = spawn( "script_model", pos + ( 0, 65, 0 ) );
    crate67 setModel( "mp_supplydrop_ally" );
    crate67.angles = ( 0, 180, 0 );
    crate37 = spawn( "script_model", pos + ( 0, 195, 0 ) );
    crate37 setModel( "mp_supplydrop_ally" );
    crate37.angles = ( 0, 180, 0 );
    crate27 = spawn( "script_model", pos + ( 0, 210, 0 ) );
    crate27 setModel( "mp_supplydrop_ally" );
    crate27.angles = ( 0, 180, 0 );
    }

    spawnDoor( pos )
    {
    level.door = spawn( "script_model", pos + ( 0, 130, 0 ) );
    level.door setModel( "mp_supplydrop_ally" );
    level.door.angles = ( 0, 180, 0 );
    level.door2 = spawn( "script_model", pos + ( 0, 130, 35 ) );
    level.door2 setModel( "mp_supplydrop_ally" );
    level.door2.angles = ( 0, 180, 0 );
    }

    spawnSRow( pos )
    {
    crate = spawn( "script_model", pos );
    crate setModel( "mp_supplydrop_ally" );
    crate.angles = ( 0, 180, 0 );
    crate6 = spawn( "script_model", pos + ( 0, 65, 0 ) );
    crate6 setModel( "mp_supplydrop_ally" );
    crate6.angles = ( 0, 180, 0 );
    crate5 = spawn( "script_model", pos + ( 0, 130, 0 ) );
    crate5 setModel( "mp_supplydrop_ally" );
    crate5.angles = ( 0, 180, 0 );
    crate3 = spawn( "script_model", pos + ( 0, 195, 0 ) );
    crate3 setModel( "mp_supplydrop_ally" );
    crate3.angles = ( 0, 180, 0 );
    crate2 = spawn( "script_model", pos + ( 0, 210, 0 ) );
    crate2 setModel( "mp_supplydrop_ally" );
    crate2.angles = ( 0, 180, 0 );
    }

    spawnSmallBase( pos )
    {
    fort[1] = spawnSmallRow(pos + ( 0, 35, 0 ) );
    fort[2] = spawnSmallRow(pos);
    fort[3] = spawnSmallRow(pos + ( 0, 70, 0 ) );
    fort[4] = spawnSmallRow(pos + ( 0, 105, 0 ) );
    fort[5] = spawnSmallRow(pos + ( 0, 140, 0 ) );
    fort[6] = spawnSmallRow(pos + ( 0, 175, 0 ) );
    fort[7] = spawnSmallRow(pos + ( 0, 210, 0 ) );
    }

    spawnFort( pos )
    {
    house[1] = spawnBase(pos);
    house[2] = spawnSmallBase(pos + ( 65, 0, 140 ) );
    house[3] = spawnSmallRow(pos + ( 65, 0, 35 ) );
    house[4] = spawnSmallRow(pos + ( 65, 0, 70 ) );
    house[5] = spawnSmallRow(pos + ( 65, 0, 105 ) );
    house[6] = spawnSmallRow(pos + ( 65, 210, 35 ) );
    house[7] = spawnSmallRow(pos + ( 65, 210, 70 ) );
    house[8] = spawnSmallRow(pos + ( 65, 210, 105 ) );
    house[9] = spawnSRow(pos + ( 325, 0, 35 ) );
    house[10] = spawnSRow(pos + ( 325, 0, 70 ) );
    house[11] = spawnSRow(pos + ( 325, 0, 105 ) );
    house[12] = spawnSRow(pos + ( 65, 0, 113 ) );
    house[13] = spawnDRow(pos + ( 65, 0, 70 ) );
    house[14] = spawnDRow(pos + ( 65, 0, 35 ) );
    ///house[15] = spawnDoor(pos + ( 65, 0, 35 ) );// this would be used if you wanted to block the fort

    0 Not allowed! Not allowed!
    Last edited by jaxx; 05-06-2012 at 03:26 AM.
    My TH()R V1 Gametype will be released soon! IRomzy What address do you search your usb gecko under?



  2. #2
    Member Crashzer's Avatar
    Join Date
    Apr 2012
    Posts
    195
    Points
    534
         User Info     Contact     Gamer ID
    Join Date
    Apr 2012
    Posts
    195
    Points
    534

    Contact info:

    Youtube Channel: youtube.com/crashzer

    Default

    Disable smileys.

    0 Not allowed! Not allowed!

  3. #3
    Member jaxx's Avatar
    Join Date
    Jul 2011
    Location
    Here i am
    Posts
    125
    Points
    350
         User Info     Contact     Gamer ID
    Join Date
    Jul 2011
    Location
    Here i am
    Posts
    125
    Points
    350

    Default

    there you go, could you help me ?

    0 Not allowed! Not allowed!
    My TH()R V1 Gametype will be released soon! IRomzy What address do you search your usb gecko under?



  4. #4
    Oh Noez Batman ChelseaGrin's Avatar

    Badge

    Join Date
    Aug 2011
    Location
    I am Become Death, the Destroyer of Worlds
    Posts
    1,456
    Points
    353
         User Info     Contact     Gamer ID
    Join Date
    Aug 2011
    Location
    I am Become Death, the Destroyer of Worlds
    Posts
    1,456
    Points
    353
    Gamer IDs

    PSN ID: byRexehh

    Default

    SetMatchFlag( "disableingamemenu", 1 );//I know, its not a dvar but I put it in here anyways.
    ^remove that see wat happens but look over it in syntax checker..
    that script doesnt seem right

    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 04:49 AM.
Powered by vBulletin®
Copyright © 2016 vBulletin Solutions, Inc. All rights reserved.