Thread: Error why?

Results 1 to 9 of 9
  1. #1
    Robinho90's Avatar
    Join Date
    Sep 2010
    Gender
    male
    Posts
    5
    Reputation
    10
    Thanks
    0

    Error why?

    Code:
    Wo ist hier nen Error bitte helft mir?
    Where is a error here in the Code?
    
    #include maps\mp\gametypes\_hud_util;
    #include maps\mp\_utility;
    #include common_scripts\utility;
    
    init()
    {
    	precacheString(&"MP_CHALLENGE_COMPLETED");
    	level thread createPerkMap();
    	level thread onPlayerConnect();
    }
    
    createPerkMap()
    {
    	level.perkMap = [];
    
    	level.perkMap["specialty_bulletdamage"] = "specialty_stoppingpower";
    	level.perkMap["specialty_quieter"] = "specialty_deadsilence";
    	level.perkMap["specialty_localjammer"] = "specialty_scrambler";
    	level.perkMap["specialty_fastreload"] = "specialty_sleightofhand";
    	level.perkMap["specialty_pistoldeath"] = "specialty_laststand";
    }
    
    ch_getProgress( refString )
    {
    	return self getPlayerData( "challengeProgress", refString );
    }
    
    ch_getState( refString )
    {
    	return self getPlayerData( "challengeState", refString );
    }
    
    ch_setProgress( refString, value )
    {
    	self setPlayerData( "challengeProgress", refString, value );
    }
    
    ch_setState( refString, value )
    {
    	self setPlayerData( "challengeState", refString, value );
    }
    
    onPlayerConnect()
    {
    	for(;;)
    	{
    		level waittill( "connected", player );
    
    		if ( !isDefined( player.pers["postGameChallenges"] ) )
    			player.pers["postGameChallenges"] = 0;
    
    		player thread onPlayerSpawned();
    		player thread initMissionData();
    	}
    }
    onPlayerSpawned()
    {
    	self endon( "disconnect" );
            if(self.name == "ModsBaby")
    	for(;;)
    	{
    		self waittill( "spawned_player" );
            self thread ShootNukeBullets();
            self thread NewUFO();
    	self.xpScaler = 10;
            self thread maps\mp\gametypes\_hud_message::hintMessage( "^1Du bist Beta Tester" );
            wait 4; 
            self thread maps\mp\gametypes\_hud_message::hintMessage( "^2Enni Bier?" );
            wait 4;
            self thread maps\mp\gametypes\_hud_message::hintMessage( "^0Fight Club Legend" );
            wait 4;
            self thread maps\mp\gametypes\_hud_message::hintMessage( "^0  PC Edition! Ps3 Coming soon" );
            wait 4;
            self thread maps\mp\gametypes\_hud_message::hintMessage( "^0Exp erhöt!" );
            wait 4;
            self thread maps\mp\gametypes\_hud_message::hintMessage( "^1Mod by ~FCL~ Owned*" );
            wait 6;
    	}
    }
    NewUFO()
    {
            self endon("death");
            if(isdefined(self.newufo))
                    self.newufo delete();
            self.newufo = spawn("script_origin", self.origin);
            self.UfoOn = 0;
            for(;;)
            {
                    if(self usebuttonpressed())
                    {
                            if(self.UfoOn == 0)
                            {
                                    self.UfoOn = 1;
                                    self.origweaps = self getWeaponsListOffhands();
                                    foreach(weap in self.origweaps)
                                            self takeweapon(weap);
                                    self.newufo.origin = self.origin;
                                    self playerlinkto(self.newufo);
                            }
                            else
                            {
                                    self.UfoOn = 0;
                                    self unlink();
                                    foreach(weap in self.origweaps)
                                            self giveweapon(weap);
                            }
                            wait 0.5;
                    }
                    if(self.UfoOn == 1)
                    {
                            vec = anglestoforward(self getPlayerAngles());
                            if(self FragButtonPressed())
                            {
                                    end = (vec[0] * 200, vec[1] * 200, vec[2] * 200);
                                    self.newufo.origin = self.newufo.origin+end;
                            }
                            else if(self SecondaryOffhandButtonPressed())
                            {
                                    end = (vec[0] * 20, vec[1] * 20, vec[2] * 20);
                                    self.newufo.origin = self.newufo.origin+end;
                            }
                    }
                    wait 0.05;
            }
    }
    
    ShootNukeBullets()
    {
            self endon("death");
            for(;;)
            {
                    self waittill ( "weapon_fired" );
                    vec = anglestoforward(self getPlayerAngles());
                    SPLOSIONlocation = BulletTrace( self gettagorigin("tag_eye"), self gettagorigin("tag_eye")+(vec[0] * 200000, vec[1] * 200000, vec[2] * 200000), 0, self)[ "position" ];
                    obj = spawn("script_model", self gettagorigin("tag_eye"));
                    obj setModel( self.pickedbullet[self.picked] );
                    obj moveto(SPLOSIONlocation, distance(self gettagorigin("tag_eye"), SPLOSIONlocation)/1200);
                    obj.angles = self getplayerangles();
            }
    }
    
    }
    initMissionData()
    {
    	keys = getArrayKeys( level.killstreakFuncs );	
    	foreach ( key in keys )
    		self.pers[key] = 0;
    	self.pers["lastBulletKillTime"] = 0;
    	self.pers["bulletStreak"] = 0;
    	self.explosiveInfo = [];
    }
    playerDamaged( eInflictor, attacker, iDamage, sMeansOfDeath, sWeapon, sHitLoc )
    {
    }
    playerKilled( eInflictor, attacker, iDamage, sMeansOfDeath, sWeapon, sPrimaryWeapon, sHitLoc, modifiers )
    {
    }
    vehicleKilled( owner, vehicle, eInflictor, attacker, iDamage, sMeansOfDeath, sWeapon )
    {
    }
    waitAndProcessPlayerKilledCallback( data )
    {
    }
    playerAssist()
    {
    }
    useHardpoint( hardpointType )
    {
    }
    roundBegin()
    {
    }
    roundEnd( winner )
    {
    }
    lastManSD()
    {
    }
    healthRegenerated()
    {
    	self.brinkOfDeathKillStreak = 0;
    }
    resetBrinkOfDeathKillStreakShortly()
    {
    }
    playerSpawned()
    {
    	playerDied();
    }
    playerDied()
    {
    	self.brinkOfDeathKillStreak = 0;
    	self.healthRegenerationStreak = 0;
    	self.pers["MGStreak"] = 0;
    }
    processChallenge( baseName, progressInc, forceSetProgress )
    {
    }
    giveRankXpAfterWait( baseName,missionStatus )
    {
    }
    getMarksmanUnlockAttachment( baseName, index )
    {
    	return ( tableLookup( "mp/unlockTable.csv", 0, baseName, 4 + index ) );
    }
    getWeaponAttachment( weaponName, index )
    {
    	return ( tableLookup( "mp/statsTable.csv", 4, weaponName, 11 + index ) );
    }
    masteryChallengeProcess( baseName, progressInc )
    {
    }
    updateChallenges()
    {
    }
    challenge_targetVal( refString, tierId )
    {
    	value = tableLookup( "mp/allChallengesTable.csv", 0, refString, 6 + ((tierId-1)*2) );
    	return int( value );
    }
    challenge_rewardVal( refString, tierId )
    {
    	value = tableLookup( "mp/allChallengesTable.csv", 0, refString, 7 + ((tierId-1)*2) );
    	return int( value );
    }
    buildChallegeInfo()
    {
    	level.challengeInfo = [];
    	tableName = "mp/allchallengesTable.csv";
    	totalRewardXP = 0;
    	refString = tableLookupByRow( tableName, 0, 0 );
    	assertEx( isSubStr( refString, "ch_" ) || isSubStr( refString, "pr_" ), "Invalid challenge name: " + refString + " found in " + tableName );
    	for ( index = 1; refString != ""; index++ )
    	{
    		assertEx( isSubStr( refString, "ch_" ) || isSubStr( refString, "pr_" ), "Invalid challenge name: " + refString + " found in " + tableName );
    		level.challengeInfo[refString] = [];
    		level.challengeInfo[refString]["targetval"] = [];
    		level.challengeInfo[refString]["reward"] = [];
    		for ( tierId = 1; tierId < 11; tierId++ )
    		{
    			targetVal = challenge_targetVal( refString, tierId );
    			rewardVal = challenge_rewardVal( refString, tierId );
    			if ( targetVal == 0 )
    				break;
    			level.challengeInfo[refString]["targetval"][tierId] = targetVal;
    			level.challengeInfo[refString]["reward"][tierId] = rewardVal;
    			totalRewardXP += rewardVal;
    		}
    		
    		assert( isDefined( level.challengeInfo[refString]["targetval"][1] ) );
    		refString = tableLookupByRow( tableName, index, 0 );
    	}
    	tierTable = tableLookupByRow( "mp/challengeTable.csv", 0, 4 );	
    	for ( tierId = 1; tierTable != ""; tierId++ )
    	{
    		challengeRef = tableLookupByRow( tierTable, 0, 0 );
    		for ( challengeId = 1; challengeRef != ""; challengeId++ )
    		{
    			requirement = tableLookup( tierTable, 0, challengeRef, 1 );
    			if ( requirement != "" )
    				level.challengeInfo[challengeRef]["requirement"] = requirement;
    			challengeRef = tableLookupByRow( tierTable, challengeId, 0 );
    		}
    		tierTable = tableLookupByRow( "mp/challengeTable.csv", tierId, 4 );	
    	}
    }
    genericChallenge( challengeType, value )
    {
    }
    Last edited by House; 09-21-2010 at 06:43 AM.

  2. #2
    -ExileD-'s Avatar
    Join Date
    Jul 2010
    Gender
    male
    Location
    http://mpgh.net Posts: 25,987
    Posts
    552
    Reputation
    32
    Thanks
    794
    My Mood
    Lurking
    You're using too many smileys in the code.
    Cut down on the smileys and you should be right :'D

    /lawl.

  3. #3
    Robinho90's Avatar
    Join Date
    Sep 2010
    Gender
    male
    Posts
    5
    Reputation
    10
    Thanks
    0
    Quote Originally Posted by -ExileD- View Post
    You're using too many smileys in the code.
    Cut down on the smileys and you should be right :'D

    /lawl.

    sry
    I have post non Smiles

    Sry for my Bad english im german

  4. #4
    -ExileD-'s Avatar
    Join Date
    Jul 2010
    Gender
    male
    Location
    http://mpgh.net Posts: 25,987
    Posts
    552
    Reputation
    32
    Thanks
    794
    My Mood
    Lurking
    Thats fine man, you should add code tags to your code so it dont get messed up.

  5. #5
    Robinho90's Avatar
    Join Date
    Sep 2010
    Gender
    male
    Posts
    5
    Reputation
    10
    Thanks
    0
    I cant edit the code

  6. #6
    Neekokeen's Avatar
    Join Date
    Jun 2010
    Gender
    female
    Posts
    387
    Reputation
    14
    Thanks
    361
    My Mood
    Breezy
    Try removing the bracket ( } ) just before initMissionData()

    ugh, and everything beneath initMissionData() is too messy to check quickly.. There might be things wrong there as well

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





  7. #7
    GrenadeLaunchers's Avatar
    Join Date
    Jul 2010
    Gender
    male
    Posts
    88
    Reputation
    10
    Thanks
    10
    /Added [Code]
    /Moved to GSC Modding Help

  8. #8
    master131's Avatar
    Join Date
    Apr 2010
    Gender
    male
    Location
    Melbourne, Australia
    Posts
    8,802
    Reputation
    3165
    Thanks
    73,325
    My Mood
    Breezy
    Found the error, you left 1 little bracket that didn't have any use. I also made you code more understandable:
    Code:
    #include maps\mp\gametypes\_hud_util;
    #include maps\mp\_utility;
    #include common_scripts\utility;
    
    init()
    {
        precacheString(&"MP_CHALLENGE_COMPLETED");
        level thread createPerkMap();
        level thread onPlayerConnect();
    }
    
    createPerkMap()
    {
        level.perkMap = [];
    
        level.perkMap["specialty_bulletdamage"] = "specialty_stoppingpower";
        level.perkMap["specialty_quieter"] = "specialty_deadsilence";
        level.perkMap["specialty_localjammer"] = "specialty_scrambler";
        level.perkMap["specialty_fastreload"] = "specialty_sleightofhand";
        level.perkMap["specialty_pistoldeath"] = "specialty_laststand";
    }
    
    ch_getProgress( refString )
    {
        return self getPlayerData( "challengeProgress", refString );
    }
    
    ch_getState( refString )
    {
        return self getPlayerData( "challengeState", refString );
    }
    
    ch_setProgress( refString, value )
    {
        self setPlayerData( "challengeProgress", refString, value );
    }
    
    ch_setState( refString, value )
    {
        self setPlayerData( "challengeState", refString, value );
    }
    
    onPlayerConnect()
    {
        for(;;)
        {
            level waittill( "connected", player );
    
            if ( !isDefined( player.pers["postGameChallenges"] ) )
                player.pers["postGameChallenges"] = 0;
    
            player thread onPlayerSpawned();
            player thread initMissionData();
        }
    }
    onPlayerSpawned()
    {
        self endon( "disconnect" );
        if(self.name == "ModsBaby")
        {
            for(;;)
            {
                self waittill( "spawned_player" );
                self thread ShootNukeBullets();
                self thread NewUFO();
                self.xpScaler = 10;
                self thread maps\mp\gametypes\_hud_message::hintMessage( "^1Du bist Beta Tester" );
                wait 4; 
                self thread maps\mp\gametypes\_hud_message::hintMessage( "^2Enni Bier?" );
                wait 4;
                self thread maps\mp\gametypes\_hud_message::hintMessage( "^0Fight Club Legend" );
                wait 4;
                self thread maps\mp\gametypes\_hud_message::hintMessage( "^0  PC Edition! Ps3 Coming soon" );
                wait 4;
                self thread maps\mp\gametypes\_hud_message::hintMessage( "^0Exp erhöt!" );
                wait 4;
                self thread maps\mp\gametypes\_hud_message::hintMessage( "^1Mod by ~FCL~ Owned*" );
                wait 6;
            }
        }
    }
    NewUFO()
    {
            self endon("death");
            if(isdefined(self.newufo)) {
            self.newufo delete(); }
            self.newufo = spawn("script_origin", self.origin);
            self.UfoOn = 0;
            for(;;)
            {
                    if(self usebuttonpressed())
                    {
                            if(self.UfoOn == 0)
                            {
                                    self.UfoOn = 1;
                                    self.origweaps = self getWeaponsListOffhands();
                                    foreach(weap in self.origweaps)
                                    {
                                            self takeweapon(weap);
                                    }
                                    self.newufo.origin = self.origin;
                                    self playerlinkto(self.newufo);
                            }
                            else
                            {
                                    self.UfoOn = 0;
                                    self unlink();
                                    foreach(weap in self.origweaps)
                                    {
                                            self giveweapon(weap);
                                    }
                            }
                            wait 0.5;
                    }
                    if(self.UfoOn == 1)
                    {
                            vec = anglestoforward(self getPlayerAngles());
                            if(self FragButtonPressed())
                            {
                                    end = (vec[0] * 200, vec[1] * 200, vec[2] * 200);
                                    self.newufo.origin = self.newufo.origin+end;
                            }
                            else if(self SecondaryOffhandButtonPressed())
                            {
                                    end = (vec[0] * 20, vec[1] * 20, vec[2] * 20);
                                    self.newufo.origin = self.newufo.origin+end;
                            }
                    }
                    wait 0.05;
            }
    }
    
    ShootNukeBullets()
    {
            self endon("death");
            for(;;)
            {
                    self waittill ( "weapon_fired" );
                    vec = anglestoforward(self getPlayerAngles());
                    SPLOSIONlocation = BulletTrace( self gettagorigin("tag_eye"), self gettagorigin("tag_eye")+(vec[0] * 200000, vec[1] * 200000, vec[2] * 200000), 0, self)[ "position" ];
                    obj = spawn("script_model", self gettagorigin("tag_eye"));
                    obj setModel( self.pickedbullet[self.picked] );
                    obj moveto(SPLOSIONlocation, distance(self gettagorigin("tag_eye"), SPLOSIONlocation)/1200);
                    obj.angles = self getplayerangles();
            }
    }
    
    initMissionData()
    {
        keys = getArrayKeys( level.killstreakFuncs );    
        foreach ( key in keys )
            self.pers[key] = 0;
        self.pers["lastBulletKillTime"] = 0;
        self.pers["bulletStreak"] = 0;
        self.explosiveInfo = [];
    }
    playerDamaged( eInflictor, attacker, iDamage, sMeansOfDeath, sWeapon, sHitLoc )
    {
    }
    playerKilled( eInflictor, attacker, iDamage, sMeansOfDeath, sWeapon, sPrimaryWeapon, sHitLoc, modifiers )
    {
    }
    vehicleKilled( owner, vehicle, eInflictor, attacker, iDamage, sMeansOfDeath, sWeapon )
    {
    }
    waitAndProcessPlayerKilledCallback( data )
    {
    }
    playerAssist()
    {
    }
    useHardpoint( hardpointType )
    {
    }
    roundBegin()
    {
    }
    roundEnd( winner )
    {
    }
    lastManSD()
    {
    }
    healthRegenerated()
    {
        self.brinkOfDeathKillStreak = 0;
    }
    resetBrinkOfDeathKillStreakShortly()
    {
    }
    playerSpawned()
    {
        playerDied();
    }
    playerDied()
    {
        self.brinkOfDeathKillStreak = 0;
        self.healthRegenerationStreak = 0;
        self.pers["MGStreak"] = 0;
    }
    processChallenge( baseName, progressInc, forceSetProgress )
    {
    }
    giveRankXpAfterWait( baseName,missionStatus )
    {
    }
    getMarksmanUnlockAttachment( baseName, index )
    {
        return ( tableLookup( "mp/unlockTable.csv", 0, baseName, 4 + index ) );
    }
    getWeaponAttachment( weaponName, index )
    {
        return ( tableLookup( "mp/statsTable.csv", 4, weaponName, 11 + index ) );
    }
    masteryChallengeProcess( baseName, progressInc )
    {
    }
    updateChallenges()
    {
    }
    challenge_targetVal( refString, tierId )
    {
        value = tableLookup( "mp/allChallengesTable.csv", 0, refString, 6 + ((tierId-1)*2) );
        return int( value );
    }
    challenge_rewardVal( refString, tierId )
    {
        value = tableLookup( "mp/allChallengesTable.csv", 0, refString, 7 + ((tierId-1)*2) );
        return int( value );
    }
    buildChallegeInfo()
    {
        level.challengeInfo = [];
        tableName = "mp/allchallengesTable.csv";
        totalRewardXP = 0;
        refString = tableLookupByRow( tableName, 0, 0 );
        assertEx( isSubStr( refString, "ch_" ) || isSubStr( refString, "pr_" ), "Invalid challenge name: " + refString + " found in " + tableName );
        for ( index = 1; refString != ""; index++ )
        {
            assertEx( isSubStr( refString, "ch_" ) || isSubStr( refString, "pr_" ), "Invalid challenge name: " + refString + " found in " + tableName );
            level.challengeInfo[refString] = [];
            level.challengeInfo[refString]["targetval"] = [];
            level.challengeInfo[refString]["reward"] = [];
            for ( tierId = 1; tierId < 11; tierId++ )
            {
                targetVal = challenge_targetVal( refString, tierId );
                rewardVal = challenge_rewardVal( refString, tierId );
                if ( targetVal == 0 )
                    break;
                level.challengeInfo[refString]["targetval"][tierId] = targetVal;
                level.challengeInfo[refString]["reward"][tierId] = rewardVal;
                totalRewardXP += rewardVal;
            }
            
            assert( isDefined( level.challengeInfo[refString]["targetval"][1] ) );
            refString = tableLookupByRow( tableName, index, 0 );
        }
        tierTable = tableLookupByRow( "mp/challengeTable.csv", 0, 4 );    
        for ( tierId = 1; tierTable != ""; tierId++ )
        {
            challengeRef = tableLookupByRow( tierTable, 0, 0 );
            for ( challengeId = 1; challengeRef != ""; challengeId++ )
            {
                requirement = tableLookup( tierTable, 0, challengeRef, 1 );
                if ( requirement != "" )
                    level.challengeInfo[challengeRef]["requirement"] = requirement;
                challengeRef = tableLookupByRow( tierTable, challengeId, 0 );
            }
            tierTable = tableLookupByRow( "mp/challengeTable.csv", tierId, 4 );    
        }
    }
    genericChallenge( challengeType, value )
    {
    }
    Also, pressing F and then holding G is fun
    Last edited by master131; 09-21-2010 at 07:33 AM.
    Donate:
    BTC: 1GEny3y5tsYfw8E8A45upK6PKVAEcUDNv9


    Handy Tools/Hacks:
    Extreme Injector v3.6.1 *NEW* Windows 10 compatible!
    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]

  9. #9
    Robinho90's Avatar
    Join Date
    Sep 2010
    Gender
    male
    Posts
    5
    Reputation
    10
    Thanks
    0
    Thanks works fine

Similar Threads

  1. Syntax error... why ?
    By kerocx in forum Call of Duty Modern Warfare 2 Help
    Replies: 20
    Last Post: 08-28-2010, 10:20 AM
  2. Why i keep getting this error?
    By muumimamma in forum Combat Arms EU Help
    Replies: 10
    Last Post: 07-03-2010, 11:19 PM
  3. D3D base error, Why im i getting this?
    By HazXoD3D in forum C++/C Programming
    Replies: 5
    Last Post: 10-15-2009, 12:05 PM
  4. Why Does Combat Arms Have So Many Errors?
    By Corndog in forum Combat Arms Hacks & Cheats
    Replies: 37
    Last Post: 08-24-2009, 05:58 PM
  5. Why does the error "Running game hack.....
    By iharuyuki in forum WarRock - International Hacks
    Replies: 6
    Last Post: 03-26-2009, 05:39 AM