cgallagher21 (06-25-2010)
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
[IMG]https://i177.photobucke*****m/albums/w238/Doommaker108/help.jpg[/IMG]
and Heres the code
Please Help and Post The Right Coding PLEASE! will someone please answer.....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!!!"); }
cgallagher21 (06-25-2010)
phillykid215 (06-19-2010)
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?
Because now i got a error "Script Compile Error: Unknown Function. [Console For More Details]"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!!!"); }
and here is the console error
Code:Error: ******* script compile error ******* Error: unknown function: Error: @ 146941
Last edited by phillykid215; 06-19-2010 at 03:04 PM.
_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!
where would u put this code anyways? ive been seeing these, and im new, so i dont know much
isnt most of that code unnecessary ??? just use scr_xpscale 99999999??
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
It's very easy once you get use to itCode://Messages self thread maps\mp\gametypes\_hud_message::hintMessage("^1Hosted ^7by ^5MPGH"); self iPrintln("^1Welcome to ^7MPGH ^4Server"); self iPrintln("^1Made by ^0shahin7777")
Hope this helped if it did press thants!!!