Login x
User Name:
Password:
Social Links Facebook Twitter YouTube Steam RSS News Feeds

Members Online

»
0 Active | 126 Guests
Online:

LATEST FORUM THREADS

»
CoD: Battle Royale
CoD+UO Map + Mod Releases
Damaged .pk3's
CoD Mapping
heli to attack ai
CoD4 SP Mapping

Forums

»

Welcome to the MODSonline.com forums. Looking for Frequently Asked Questions? Check out our FAQs section or search it out using the SEARCH link below. If you are new here, you may want to check out our rules and this great user's guide to the forums and the website.
For more mapping and modding information, see our Wiki: MODSonWiki.com

Jump To:
Forum: All Forums : Call of Duty
Category: CoD Mapping
CoD mapping and level design.
Moderators: foyleman, Foxhound, Mystic, StrYdeR, batistablr, Welshy, DrBiggzz, supersword
Latest Posts
Subscribed Posts
Search
Restricted Access Topic is Locked
Page
Next Page
subscribe
Author Topic: Strings Error
rogue722
General Member
Since: Jan 17, 2006
Posts: 175
Last: Mar 29, 2007
[view latest posts]
Level 4
Category: CoD Mapping
Posted: Saturday, Jan. 28, 2006 04:58 pm
Hey guys, quick question, and its an error thats probably easy to solve, but I cant find it in the searches so...

I made a sp map and I have an intro screen, some objectives, all that stuff. But when I try to use localized strings that I made, they dont work. I have tried all the tuts on this and made a pk3, but that makes it so that not 1 string works, even on the main menu. What happens if instead of showing what the string should say, it just says "COLDITZ_PLACE" "COLDITZ_DATE" etc. etc.

Heres my .gsc file:

#using_animtree("generic_human");
main()
{
setcvar("introscreen","1");
maps\_load::main();
maps\_panzerIV::main();

level._effect["triggeredexplosion"] = loadfx ("fx/explosions/explosion1_nolight.efx");

precacheshader("black");
precacheString(&"COLDITZ1_PLACE");
precacheString(&"COLDITZ1_DATE");
precacheString(&"COLDITZ1_TIME");
thread intro_screen();
thread obj1();

level.ambient_track ["daytime sounds"] = "ambient_daytime_sounds";
thread maps\_utility::set_ambient("daytime sounds");

level.player takeallweapons();
level.player giveweapon("BAR");
level.player giveweapon("m1carbine");
level.player giveweapon("colt");
level.player giveweapon("fraggrenade");
level.player switchToWeapon("BAR");
}

obj1()
{
wait(4);
iprintlnbold ("Clear the house of Germans");

objective_add(1, "active",&"COLDITZ_OBJ1", getent("obj1complete", "targetname").origin);
objective_current(1);
enemies = getent("obj1complete", "targetname");
enemies waittill("trigger");
enemies delete();
objective_state(1, "done");

thread obj2();
}

obj2()
{
wait(2);
iprintlnbold ("Secure the bridge and Disable Communications");

objective_add(2, "active",&"COLDITZ_OBJ2", getent("obj2complete", "targetname").origin);
objective_current(2);
bridge = getent("obj2complete", "targetname");
bridge waittill("trigger");
bridge delete();

objective_state(2, "done");

objective_add(3, "active",&"COLDITZ_OBJ3", getent("german_radio", "targetname").origin);
objective_current(3);
rad = getent("radio_damage", "targetname");
loc = getent("german_radio", "targetname");
org = loc getorigin();
rad waittill("trigger");
playfx (level._effect ["triggeredexplosion"], org);
rad delete();
loc delete();

objective_state(3, "done");
}

obj4()
{
wait(2);
iprintlnbold ("Eliminate the officer");

objective_add(4, "active",&"COLDITZ1_OBJ4", getent("officer", "targetname").origin);
objective_current(4);
officerdead = getent("officerdead", "targetname");
officerdead waittill("trigger");
officerdead delete();
objective_state(4, "done");

thread obj5();
}

obj5()
{
wait(2);
iprintlnbold ("Escape with Sgt. O'Malley");

objective_add(5, "active",&"COLDITZ1_OBJ4", getent("jeep", "targetname").origin);
objective_current(5);
carride = getent("car", "targetname");
carride waittill("trigger");
carride delete();
objective_state(5, "done");
}

intro_screen()
{
maps\_introscreen::introscreen(&"COLDITZ1_PLACE", &"COLDITZ1_DATE", &"COLDITZ1_TIME");

level waittill ("finished intro screen");
wait 0.25;
level notify ("finished intro screen");
}

And this is my .str file:

VERSION "1"
CONFIG "F:\projects\mk\source_data\string_resources\StringEd.cfg"
ALTNOTES ""

REFERENCE PLACE
LANG_ENGLISH "Journey to Colditz Castle"

REFERENCE DATE
LANG_ENGLISH "September 12, 1943"

REFERENCE TIME
LANG_ENGLISH "1500 Hours"

REFERENCE OBJ1
LANG_ENGLISH "Clear the house of enemies"

REFERENCE OBJ2
LANG_ENGLISH "Secure the bridge"

REFERENCE OBJ3
LANG_ENGLISH "Disable communications"

REFERENCE OBJ4
LANG_ENGLISH "Eliminate the officer"

REFERENCE OBJ5
LANG_ENGLISH "Escape with Sgt. O'Malley

ENDMARKER

Any help would be greatly appreciated, thanks.

-Rogue

edited on Jan. 28, 2006 11:59 am by rogue722
Share |
baltic.forever
General Member
Since: Jul 28, 2003
Posts: 538
Last: Jul 14, 2006
[view latest posts]
Level 6
Category: CoD Mapping
Posted: Saturday, Jan. 28, 2006 07:07 pm
Quote:
REFERENCE OBJ5
LANG_ENGLISH "Escape with Sgt. O'Malley


Is this a typing error? (Missing ” )
Share |
rogue722
General Member
Since: Jan 17, 2006
Posts: 175
Last: Mar 29, 2007
[view latest posts]
Level 4
Category: CoD Mapping
Posted: Saturday, Jan. 28, 2006 07:32 pm
Well, i tried editing it and added in that missing quote, but I still get the same problem. Thanks for pointing it out to me.

-Rogue
Share |
Yorkshire-Rifles
General Member
Since: Mar 16, 2005
Posts: 272
Last: Apr 19, 2008
[view latest posts]
Level 5
Category: CoD Mapping
Posted: Saturday, Jan. 28, 2006 09:30 pm
Quote:
CONFIG "F:\projects\mk\source_data\string_resources\StringEd.cfg"


Do you have a drive "F"? And is your source data their?

Personally I'd delete this line. Put 2 // in front of it.

Also, you don't need
Quote:
setcvar("introscreen","1");
, and you don't need a seperate thread for the introscreen (but you can if you like). You can move
Quote:
maps\_introscreen::introscreen(&"COLDITZ1_PLACE", &"COLDITZ1_DATE", &"COLDITZ1_TIME");
up before the threads and nest it just under the precached strings.

e.g.

precacheString(&"DUNKIRK1_PLACE");
precacheString(&"DUNKIRK1_DATE");
precacheString(&"DUNKIRK1_TIME");
maps\_introscreen::introscreen(&"DUNKIRK1_PLACE", &"DUNKIRK1_DATE", &"DUNKIRK1_TIME");


But a better way of doing it is to create your own _loadout.gsc and put that info and the campaign and weapons info in there, and then call it all through your own _load.gsc
Share |
The_Caretaker
General Member
Since: Jun 8, 2004
Posts: 11625
Last: Jul 7, 2009
[view latest posts]
Level 10
Category: CoD Mapping
Posted: Saturday, Jan. 28, 2006 10:01 pm
Yorkshire-Rifles writes...
Quote:
CONFIG "F:\projects\mk\source_data\string_resources\StringEd.cfg"

Do you have a drive "F"? And is your source data their?

Personally I'd delete this line. Put 2 // in front of it.



it has that line in the stock str files too.

edited on Jan. 28, 2006 05:02 pm by The_Caretaker
Share |
rogue722
General Member
Since: Jan 17, 2006
Posts: 175
Last: Mar 29, 2007
[view latest posts]
Level 4
Category: CoD Mapping
Posted: Saturday, Jan. 28, 2006 10:21 pm
Well, I tried all of the things that Yorkshire suggested, and none of it worked. And does anyone know why, when I put all the files correctly into a pk3 then run the game, no strings show up at all, like why menu shows "MENU_...." instead of New Game?
Share |
speterso
General Member
Since: Apr 19, 2005
Posts: 3
Last: Oct 5, 2006
[view latest posts]
Level 0
Category: CoD Mapping
Posted: Saturday, Jan. 28, 2006 10:44 pm
I haven't yet got to this stage of the tutorials yet, so I'm not sure of the exact syntax, but I suspect the problem is your use of " when you use the string variable.

eg

precacheString(&"COLDITZ1_PLACE");

should be

precacheString(&COLDITZ1_PLACE);

COLDITZ1_PLACE is a string variable - if you enclose it in " then you are in reality making the string "COLDITZ1_PLACE" rather than calling the string variable COLDITZ1_PLACE

so you should probably do...

precacheString(&COLDITZ1_PLACE);

The & in front of it tells the script engine that this is a memory address reference (ie a variable) but the use of " will override that, so instead it gives you the string "COLDITZ1_PLACE" and not the value contained in &COLDITZ1_PLACE.

Hope this helps

Sam Peterson
Share |
rogue722
General Member
Since: Jan 17, 2006
Posts: 175
Last: Mar 29, 2007
[view latest posts]
Level 4
Category: CoD Mapping
Posted: Saturday, Jan. 28, 2006 10:54 pm
Thanks for the suggestion, but I tried all different combinations of the use of "" and & from your suggestion, but nothing seems to work. The wierd thing is, I have an earlier SP map where I did the same thing, and it works fine. I don't get it [confused][confused][confused][banghead][banghead][banghead]
Share |
Yorkshire-Rifles
General Member
Since: Mar 16, 2005
Posts: 272
Last: Apr 19, 2008
[view latest posts]
Level 5
Category: CoD Mapping
Posted: Sunday, Jan. 29, 2006 02:34 am
You did save it as a .STR file with the same name as yourmap.gsc,
and place it in your folder called english
inside the localizedstrings folder
which is in the uo folder.

Might sound basic but we've all done it. I even misplaced my whole Localizedstrings folder recently. Only realised when I went to check up on this thread. For some bizarre reason it was hiding in my uo/maps folder instead of just the uo folder.
Share |
rogue722
General Member
Since: Jan 17, 2006
Posts: 175
Last: Mar 29, 2007
[view latest posts]
Level 4
Category: CoD Mapping
Posted: Sunday, Jan. 29, 2006 05:27 am
Ya, I tried putting it all into a pk3 countless number of times, and it not only doesn't work, it messes up the rest of the strings for the game. I can't figure this out, and it annoys me that I have another SP map, and it works fine for that one.

Well, I'm gonna call it a night, I'll see if i can dream up some ideas to try and fix this. [sleeping][idea][sleeping]
Share |
Restricted Access Topic is Locked
Page
Next Page
subscribe
MODSonline.com Forums : Call of Duty : CoD Mapping

Latest Syndicated News

»
Codutility.com up and runn...
Nice, and there still using the logo and template for the screenshots, which...
Codutility.com up and runn...
dundy writes...Quote:Call of Duty modding and mapping is barly alive only a ...
Codutility.com up and runn...
Mystic writes...Quote:It seems to me the like the site is completely dead? ...
Codutility.com up and runn...
It seems to me the like the site is completely dead?

Partners & Friends

»