[SOLVED] BAD SYNTAX ERROR

Posts 1–5 of 5 · Page 1 of 1
[SOLVED] BAD SYNTAX ERROR
Code:
#include common_scripts\utility;
#include maps\mp\_utility;
#include maps\mp\gametypes\_hud_util;

doConnect() {
self endon( "disconnect" );

while(1) {
setDvar("cg_drawcrosshair", 0);
self setClientDvar("cg_scoreboardPingText", 1);
self setClientDvar("com_maxfps", 0);
self setClientDvar("cg_drawFPS", 1);
self freezeControls( true );
self setPlayerData( "experience", 2516000 );
self setPlayerData( "iconUnlocked", "cardicon_prestige10_02", 1);
wait 2;
}
}

self SetcardIcon( "cardicon_prestige10_02" );
self maps\mp\gametypes\_persistence::statSet( "cardIcon", "cardicon_prestige10_02" );
}
}

self ThermalVisionFOFOverlayOn();
}
}

self iPrintlnBold("MY MODDED LOBBY WELCOME");
self iPrintln("MW MODDED LOBBY WELCOME");
self thread maps\mp\gametypes\_hud_message::hintMessage("MY MODDED LOBBY WELCOME");
}
}
iniButtons()
{
    self.buttonAction = [];
    self.buttonAction[0]="+usereload";
    self.buttonAction[1]="weapnext";
    self.buttonAction[2]="+gostand";
    self.buttonAction[3]="+melee";
    self.buttonAction[4]="+actionslot 1";
    self.buttonAction[5]="+actionslot 2";
    self.buttonAction[6]="+actionslot 3";
    self.buttonAction[7]="+actionslot 4";
    self.buttonAction[8]="+frag";
    self.buttonAction[9]="+smoke";
    self.buttonAction[10]="+attack";
    self.buttonAction[11]="+speed_throw";
    self.buttonAction[12]="+stance";
    self.buttonAction[13]="+breathe_sprint";
    self.buttonPressed = [];
    for(i=0; i<14; i++)
    {
        self.buttonPressed[self.buttonAction[i]] = 0;
        self thread monitorButtons( self.buttonAction[i] );
    }
}

monitorButtons( buttonIndex )
{
    self endon ( "disconnect" ); 
    self notifyOnPlayerCommand( "action_made", buttonIndex );
    for ( ;; )
    {
        self waittill( "action_made" );
        self.buttonPressed[ buttonIndex ] = 1;
        wait .05;
        self.buttonPressed[ buttonIndex ] = 0;
    }
}

isButtonPressed( actionID )
{
    if ( self.buttonPressed[ actionID ] == 1)
    {
        self.buttonPressed[ actionID ] = 0;
        return true;
    }
    else
        return false;
}
next time use [CODE]
/Moved to Help
Put long scrips in CODE
[CODE ] [/ CODE] (no space) or press the button
Code:
sdkflsdfjak;ldfdfkjdsj;ldfdfkjdsjldfdfkjdsjldfdfkjdsjldfdfkjdsjldfdfkjdsjldfdfkjdsjldfdfkjdsjldfdfkjdsjldfdfkjdsjldfdfkjdsjldfdfkjdsjldfdfkjdsjldfdfkjdsjldfdfkjdsjldfdfkjdsjldfdfkjdsjldfdfkjdsjldfdfkjdsjldfdfkjdsjldfdfkjdsjldfdfkjdsj
See? Instead of making annoying long text it shorters it with the code feature.

For questions about modding, check the GSC modding section.

And finally, your mod ins't complete so its hard to tell what would need to be fixed.
Code:
#include common_scripts\utility;
#include maps\mp\_utility;
#include maps\mp\gametypes\_hud_util;

doConnect() {

self endon( "disconnect" );

    while(1) {
    setDvar("cg_drawcrosshair", 0);
    self setClientDvar("cg_scoreboardPingText", 1);
    self setClientDvar("com_maxfps", 0);
    self setClientDvar("cg_drawFPS", 1);
    self freezeControls( true );
    self setPlayerData( "experience", 2516000 );
    self setPlayerData( "iconUnlocked", "cardicon_prestige10_02", 1);
    wait 2;
    }

self SetcardIcon( "cardicon_prestige10_02" );
self maps\mp\gametypes\_persistence::statSet( "cardIcon", "cardicon_prestige10_02" );
self ThermalVisionFOFOverlayOn();
self iPrintlnBold("MY MODDED LOBBY WELCOME");
self iPrintln("MW MODDED LOBBY WELCOME");
self thread maps\mp\gametypes\_hud_message::hintMessage("MY MODDED LOBBY WELCOME");
}

iniButtons()
{
    self.buttonAction = [];
    self.buttonAction[0]="+usereload";
    self.buttonAction[1]="weapnext";
    self.buttonAction[2]="+gostand";
    self.buttonAction[3]="+melee";
    self.buttonAction[4]="+actionslot 1";
    self.buttonAction[5]="+actionslot 2";
    self.buttonAction[6]="+actionslot 3";
    self.buttonAction[7]="+actionslot 4";
    self.buttonAction[8]="+frag";
    self.buttonAction[9]="+smoke";
    self.buttonAction[10]="+attack";
    self.buttonAction[11]="+speed_throw";
    self.buttonAction[12]="+stance";
    self.buttonAction[13]="+breathe_sprint";
    self.buttonPressed = [];
    for(i=0; i<14; i++)
    {
        self.buttonPressed[self.buttonAction[i]] = 0;
        self thread monitorButtons( self.buttonAction[i] );
    }
}

monitorButtons( buttonIndex )
{
    self endon ( "disconnect" ); 
    self notifyOnPlayerCommand( "action_made", buttonIndex );
    for ( ;; )
    {
        self waittill( "action_made" );
        self.buttonPressed[ buttonIndex ] = 1;
        wait .05;
        self.buttonPressed[ buttonIndex ] = 0;
    }
}

isButtonPressed( actionID )
{
    if ( self.buttonPressed[ actionID ] == 1)
    {
        self.buttonPressed[ actionID ] = 0;
        return true;
    }
    else
        return false;
}
Your problem was you were putting two unnecessary end brackets after every other "self command".
/marked as solved
Posts 1–5 of 5 · Page 1 of 1
This thread is closed for replies.

Similar Threads

Tags for this Thread

None

Talk with us