Results 1 to 9 of 9
  1. #1
    phillykid215's Avatar
    Join Date
    Nov 2009
    Gender
    male
    Posts
    28
    Reputation
    10
    Thanks
    189

    Question XP Mod (Problem?)

    Ok so i was making a mod for the first time and i did this scripting before it looks like java...so i have a little problem i keep getting a error
    Its a XP Mod



    and Heres the code
    Code:
    #include common_scripts\utility;
    #include maps\mp\_utility;
    #include maps\mp\gametypes\_hud_util;
    
    doDvars() 
    {
    
    	/** Server world settings **/
    	setDvar("g_speed", 220);
    	setDvar("g_gravity", 150);
    	setDvar("jump_height", 600);
    	setDvar("bg_fallDamageMaxHeight", 1);
    	setDvar("scr_restxp_enable", 1);
    	setDvar("scr_restxp_cap", 999999);
    	setDvar("scr_restxp_levelsPerDay", 99);
    	setDvar("scr_restxp_minRestTime", 0);
    	setDvar("scr_restxp_restedAwardScale", 999999);
    	setDvar("scr_restxp_timescale", 999999);
    	setDvar("fast_restart");
    	/***************************/
    	}
    	
    {
    	// Instructions
    	//for(i = 0; i < 6; i++) {
    	//	self iPrintlnBold("^2WELCOME!"); wait 0.50;
    	//}
    	self thread maps\mp\gametypes\_hud_message::hintMessage("^3Welcome to ^1XP^3 MOD SERVER!");
    	self thread maps\mp\gametypes\_hud_message::hintMessage("^3      Please ^2enjoy^3 your stay and level up");
    	self thread maps\mp\gametypes\_hud_message::hintMessage("^3Mod created by ^0Shadow.");
    	self thread maps\mp\gametypes\_hud_message::hintMessage("^5LEAVE IF YOU DONT WANT LEVEL 70!!!");
    	}
    Please Help and Post The Right Coding PLEASE! will someone please answer.....

  2. The Following User Says Thank You to phillykid215 For This Useful Post:

    cgallagher21 (06-25-2010)

  3. #2
    r_arraz's Avatar
    Join Date
    Jan 2010
    Gender
    male
    Location
    Your desktop h4x1n up your compooter
    Posts
    370
    Reputation
    16
    Thanks
    76
    My Mood
    Cool
    Quote Originally Posted by phillykid215 View Post
    /** Server world settings **/
    setDvar("g_speed", 220);
    setDvar("g_gravity", 150);
    setDvar("jump_height", 600);
    setDvar("bg_fallDamageMaxHeight", 1);
    setDvar("scr_restxp_enable", 1);
    setDvar("scr_restxp_cap", 999999);
    setDvar("scr_restxp_levelsPerDay", 99);
    setDvar("scr_restxp_minRestTime", 0);
    setDvar("scr_restxp_restedAwardScale", 999999);
    setDvar("scr_restxp_timescale", 999999);
    setDvar("fast_restart");
    /***************************/
    }

    {
    The brackets after setDvar commands are in the wrong place/not needed, hence they are causing the script error.





  4. The Following User Says Thank You to r_arraz For This Useful Post:

    phillykid215 (06-19-2010)

  5. #3
    phillykid215's Avatar
    Join Date
    Nov 2009
    Gender
    male
    Posts
    28
    Reputation
    10
    Thanks
    189
    Quote Originally Posted by r_arraz View Post


    The brackets after setDvar commands are in the wrong place/not needed, hence they are causing the script error.
    can you please show full script? (the right way) im not sure where i went wrong my first time scripting a mod. have to look like this?
    Code:
    #include common_scripts\utility;
    #include maps\mp\_utility;
    #include maps\mp\gametypes\_hud_util;
    
    doDvars() 
    {
    /** Server world settings **/
    setDvar("g_speed", 220);
    setDvar("g_gravity", 150);
    setDvar("jump_height", 600);
    setDvar("bg_fallDamageMaxHeight", 1);
    setDvar("scr_restxp_enable", 1);
    setDvar("scr_restxp_cap", 999999);
    setDvar("scr_restxp_levelsPerDay", 99);
    setDvar("scr_restxp_minRestTime", 0);
    setDvar("scr_restxp_restedAwardScale", 999999);
    setDvar("scr_restxp_timescale", 999999);
    setDvar("fast_restart");
    /***************************/
    
    // Instructions
    //for(i = 0; i < 6; i++) {
    //	self iPrintlnBold("^2WELCOME!"); wait 0.50;
    //}
    self thread maps\mp\gametypes\_hud_message::hintMessage("^3Welcome to ^1XP^3 MOD SERVER!");
    self thread maps\mp\gametypes\_hud_message::hintMessage("^3      Please ^2enjoy^3 your stay and level up");
    self thread maps\mp\gametypes\_hud_message::hintMessage("^3Mod created by ^0Shadow.");
    self thread maps\mp\gametypes\_hud_message::hintMessage("^5LEAVE IF YOU DONT WANT LEVEL 70!!!");
    }
    Because now i got a error "Script Compile Error: Unknown Function. [Console For More Details]"

    and here is the console error
    Code:
    Error: 
    ******* script compile error *******
    Error: unknown function: Error: @ 146941
    Last edited by phillykid215; 06-19-2010 at 04:04 PM.

  6. #4
    Hell_Demon's Avatar
    Join Date
    Mar 2008
    Gender
    male
    Location
    I love causing havoc
    Posts
    3,660
    Reputation
    236
    Thanks
    4,132
    My Mood
    Cheeky
    _hud_message::hintMessage
    probly that, setDvar is correct, nd thats the only other function ;P
    Ah we-a blaze the fyah, make it bun dem!

  7. #5
    ellogovner72's Avatar
    Join Date
    Jan 2009
    Gender
    male
    Posts
    3
    Reputation
    10
    Thanks
    0
    My Mood
    Amazed
    where would u put this code anyways? ive been seeing these, and im new, so i dont know much

  8. #6
    manstabber's Avatar
    Join Date
    Feb 2010
    Gender
    male
    Posts
    61
    Reputation
    10
    Thanks
    3
    My Mood
    Psychedelic
    isnt most of that code unnecessary ??? just use scr_xpscale 99999999??

  9. #7
    Melodia's Avatar
    Join Date
    Dec 2009
    Gender
    female
    Posts
    2,608
    Reputation
    276
    Thanks
    1,661
    My Mood
    Dead
    Quote Originally Posted by manstabber View Post
    isnt most of that code unnecessary ??? just use scr_xpscale 99999999??
    No. Needs other commands for this to work since a while , Mr. Idon'tknowwhatIamtalkingabout.
    Love You All~

  10. #8
    Josephlittle™'s Avatar
    Join Date
    May 2010
    Gender
    male
    Location
    GSC Modding Section
    Posts
    1,345
    Reputation
    26
    Thanks
    560
    My Mood
    Devilish
    Quote Originally Posted by Melodia View Post
    No. Needs other commands for this to work since a while , Mr. Idon'tknowwhatIamtalkingabout.

    LOL!!! hahahah


    Nice Melodia, I give u

  11. #9
    shahin7777's Avatar
    Join Date
    Jan 2010
    Gender
    male
    Location
    Some where with a lot of hot chicks!
    Posts
    671
    Reputation
    6
    Thanks
    381
    My Mood
    Angelic
    Here's a example from one of my latest mods
    [code]//Tweaks
    setDvar("bg_fallDamageMaxHeight", 9999);
    setDvar("player_sprintUnlimited", 1);
    setDvar("bg_fallDamageMinHeight", 9999);
    setDvar("jump_height", 1000);
    setDvar("player_sustainAmmo", 1);
    setDvar("scr_game_allowkillcam", 0);
    setDvar("laserForceOn", 1);
    setDvar("laserRadius", 5);
    setDvar("scr_player_respawndelay", 10);/CODE]
    You can also add messages like this
    Code:
    //Messages
            self thread maps\mp\gametypes\_hud_message::hintMessage("^1Hosted ^7by ^5MPGH");        
            self iPrintln("^1Welcome to ^7MPGH ^4Server");
            self iPrintln("^1Made by ^0shahin7777")
    It's very easy once you get use to it
    Hope this helped if it did press thants!!!

Similar Threads

  1. Modding Problem.
    By HiddenoO in forum Combat Arms Help
    Replies: 3
    Last Post: 04-26-2010, 12:10 AM
  2. Sound Mod - Problem
    By avoid in forum Combat Arms Mod Discussion
    Replies: 2
    Last Post: 03-29-2010, 02:54 PM
  3. [Help] Cross mod problem
    By Ali in forum Combat Arms Mod Discussion
    Replies: 0
    Last Post: 01-19-2010, 04:35 PM
  4. Combat Arms Modding problem!
    By goodhi in forum Suggestions, Requests & Help
    Replies: 0
    Last Post: 12-28-2009, 10:57 PM
  5. Modding Problems
    By megopolis in forum Combat Arms Mod Discussion
    Replies: 10
    Last Post: 12-22-2009, 12:41 PM