Location location

Download scenarios and talk about scenario design.

Moderators: Slitherine Core, BA Moderators

Post Reply
Jugger
Corporal - 5 cm Pak 38
Corporal - 5 cm Pak 38
Posts: 35
Joined: Sun Aug 08, 2010 7:38 am

Location location

Post by Jugger »

:? im trying to add location names to my map. Here is my script
IDS_LOC_VIERVILLE_SUR_MER, "VIERVILLE SUR MER",
IDS_LOC_DRAW_1, "DRAW 1",
IDS_LOC_WN_71, "WN 71",
IDS_LOC_WN_72, "WN 72",
IDS_LOC_DOG_GREEN_SECTOR_OMAHA_BEACH, "DOG GREEN SECTOR OMAHA BEACH",
IDS_LOC_HAMEL_AU_PETRE, "HAMEL AU PETRE",
IDS_LOC_CHATEAU_DE_VAUMICEL, "CHATEAU DE VAUMICEL",


And I put

ShowTextMarker(1, 24, 34, "IDS_LOC_VIERVILLE SUR MER", 7, "FFFFFF", 1);
ShowTextMarker(2, 24, 26, "IDS_LOC_DRAW_1", 7, "FFFFFF", 1);
ShowTextMarker(3, 26, 26, "IDS_LOC_WN_71", 7, "FFFFFF", 1);
ShowTextMarker(4, 22, 26, "IDS_LOC_WN_72", 7, "FFFFFF", 1);
ShowTextMarker(5, 32, 16, "IDS_LOC_DOG_GREEN_SECTOR_OMAHA_BEACH", 7, "FFFFFF", 1);
ShowTextMarker(6, 74, 26, "IDS_LOC_HAMEL AU PETRE", 7, "FFFFFF", 1);
ShowTextMarker(7, 32, 43, "IDS_LOC_CHATEAU_DE_VAUMICEL", 7, "FFFFFF", 1);
in my .BSF fiIe. I keep getting this error."Failed to find variablle IDS_LOC_VIERVILLE_SUR_MER" Did you forget to predifine it?

Thanks for youe help
junk2drive
BA Moderator
BA Moderator
Posts: 1478
Joined: Sun May 23, 2010 4:47 pm
Location: Arizona USA -7GMT

Post by junk2drive »

Maybe your Show Text Marker needs underscores in the names.
adherbal
The Artistocrats
The Artistocrats
Posts: 3900
Joined: Fri Jun 24, 2005 6:42 pm
Location: Belgium

Post by adherbal »

yeah you seem to be using spaces instead of underscores in some of the text markers.
Jugger
Corporal - 5 cm Pak 38
Corporal - 5 cm Pak 38
Posts: 35
Joined: Sun Aug 08, 2010 7:38 am

Post by Jugger »

:) Thanks, but still getting the same error message after adding the missing underscores?
IainMcNeil
Site Admin
Site Admin
Posts: 13558
Joined: Fri Apr 01, 2005 10:19 am

Post by IainMcNeil »

There were multiple missing _

Can you repost what you have so people can see if it is all fixed :)

The error seems to suggest it is looking for a variable with that name not a string. Are you sure you have the right number of parameters in the ShowTextMarker function? Check your file for the text "IDS_LOC_VIERVILLE_SUR_MER" and make sure it is not appearing somewhere else it should not.
Merr
Captain - Heavy Cruiser
Captain - Heavy Cruiser
Posts: 903
Joined: Mon Aug 16, 2010 2:00 pm

Re: Location location

Post by Merr »

Jugger wrote:
ShowTextMarker(1, 24, 34, "IDS_LOC_VIERVILLE SUR MER", 7, "FFFFFF", 1);
ShowTextMarker(2, 24, 26, "IDS_LOC_DRAW_1", 7, "FFFFFF", 1);
ShowTextMarker(3, 26, 26, "IDS_LOC_WN_71", 7, "FFFFFF", 1);
ShowTextMarker(4, 22, 26, "IDS_LOC_WN_72", 7, "FFFFFF", 1);
ShowTextMarker(5, 32, 16, "IDS_LOC_DOG_GREEN_SECTOR_OMAHA_BEACH", 7, "FFFFFF", 1);
ShowTextMarker(6, 74, 26, "IDS_LOC_HAMEL AU PETRE", 7, "FFFFFF", 1);
ShowTextMarker(7, 32, 43, "IDS_LOC_CHATEAU_DE_VAUMICEL", 7, "FFFFFF", 1);
in my .BSF fiIe. I keep getting this error."Failed to find variablle IDS_LOC_VIERVILLE_SUR_MER" Did you forget to predifine it?

Thanks for youe help
Looks like you forgot to define the VP with the location , for instance ... if VIERVILLE_SUR_MER was a german VP ;

ShowTextMarker(-1, 24, 34, "german_victory_marker", 1);
ShowTextMarker(1, 24, 34, "IDS_LOC_VIERVILLE_SUR_MER", 7, "FFFFFF", 1);
ShowTextMarker(-2, 24, 26, "german_victory_marker", 1);
ShowTextMarker(2, 24, 26, "IDS_LOC_DRAW_1", 7, "FFFFFF", 1);

etc,etc,etc
Jugger
Corporal - 5 cm Pak 38
Corporal - 5 cm Pak 38
Posts: 35
Joined: Sun Aug 08, 2010 7:38 am

Post by Jugger »

:) This is my entire sript so far. These names/places will eventually be U.S objective points

IDS_LOC1_Vierville_Sur_Mer, "Vierville Sur Mer",
IDS_LOC2_Draw_1, "Draw 1",
IDS_LOC3_WN_71, "WN 71",
IDS_LOC4_WN_72, "WN 72",
IDS_LOC5_Dog_Green_Sector_Omaha_Beach, "Dog Green Sector Omaha Beach",
IDS_LOC6_Hamel_Au_Petre, "Hamel Au Petre",
IDS_LOC7_Chateau_De_Vaumicel, "Chateau De Vaumicel",


And I put

ShowTextMarker(1, 24, 34, "IDS_LOC1_Vierville_ Sur_ Mer", 8, "FFFFFF", 1);
ShowTextMarker(2, 24, 26, "IDS_LOC2_Draw_1", 8, "FFFFFF", 1);
ShowTextMarker(3, 26, 26, "IDS_LOC3_WN_71", 8, "FFFFFF", 1);
ShowTextMarker(4, 22, 26, "IDS_LOC4_WN_72", 8, "FFFFFF", 1);
ShowTextMarker(5, 32, 16, "IDS_LOC5_Dog_Green_Sector_Omaha_Beach", 8, "FFFFFF", 1);
ShowTextMarker(6, 74, 26, "IDS_LOC6_Hamel_ Au_ Petre", 8, "FFFFFF", 1);
ShowTextMarker(7, 32, 43, "IDS_LOC7_Chateau_De_Vaumicel", 8, "FFFFFF", 1);
in my .BSF file.
Merr
Captain - Heavy Cruiser
Captain - Heavy Cruiser
Posts: 903
Joined: Mon Aug 16, 2010 2:00 pm

Post by Merr »

Jugger wrote::)
ShowTextMarker(1, 24, 34, "IDS_LOC1_Vierville_ Sur_ Mer", 8, "FFFFFF", 1);
ShowTextMarker(2, 24, 26, "IDS_LOC2_Draw_1", 8, "FFFFFF", 1);
ShowTextMarker(3, 26, 26, "IDS_LOC3_WN_71", 8, "FFFFFF", 1);
ShowTextMarker(4, 22, 26, "IDS_LOC4_WN_72", 8, "FFFFFF", 1);
ShowTextMarker(5, 32, 16, "IDS_LOC5_Dog_Green_Sector_Omaha_Beach", 8, "FFFFFF", 1);
ShowTextMarker(6, 74, 26, "IDS_LOC6_Hamel_ Au_ Petre", 8, "FFFFFF", 1);
ShowTextMarker(7, 32, 43, "IDS_LOC7_Chateau_De_Vaumicel", 8, "FFFFFF", 1);
in my .BSF file.
then bsf stuff should read ;

ShowTextMarker(-1, 24, 34, "us_victory_marker", 1);
ShowTextMarker(1, 24, 34, "IDS_LOC1_Vierville_ Sur_ Mer", 8, "FFFFFF", 1);
ShowTextMarker(-2, 24, 26, "us_victory_marker", 1);
ShowTextMarker(2, 24, 26, "IDS_LOC2_Draw_1", 8, "FFFFFF", 1);
ShowTextMarker(-3, 26, 26, "us_victory_marker", 1);
ShowTextMarker(3, 26, 26, "IDS_LOC3_WN_71", 8, "FFFFFF", 1);
etc
etc
etc
etc
Jugger
Corporal - 5 cm Pak 38
Corporal - 5 cm Pak 38
Posts: 35
Joined: Sun Aug 08, 2010 7:38 am

Post by Jugger »

Thanks to all will give that ago :D
Merr
Captain - Heavy Cruiser
Captain - Heavy Cruiser
Posts: 903
Joined: Mon Aug 16, 2010 2:00 pm

Post by Merr »

Jugger wrote:Thanks to all will give that ago :D
quite welcome ...

Also, open one of the Normandy BSF files ... reference that for code example's
adherbal
The Artistocrats
The Artistocrats
Posts: 3900
Joined: Fri Jun 24, 2005 6:42 pm
Location: Belgium

Post by adherbal »

ShowTextMarker(1, 24, 34, "IDS_LOC1_Vierville_ Sur_ Mer", 8, "FFFFFF", 1);
ShowTextMarker(2, 24, 26, "IDS_LOC2_Draw_1", 8, "FFFFFF", 1);
ShowTextMarker(3, 26, 26, "IDS_LOC3_WN_71", 8, "FFFFFF", 1);
ShowTextMarker(4, 22, 26, "IDS_LOC4_WN_72", 8, "FFFFFF", 1);
ShowTextMarker(5, 32, 16, "IDS_LOC5_Dog_Green_Sector_Omaha_Beach", 8, "FFFFFF", 1);
ShowTextMarker(6, 74, 26, "IDS_LOC6_Hamel_ Au_ Petre", 8, "FFFFFF", 1);
ShowTextMarker(7, 32, 43, "IDS_LOC7_Chateau_De_Vaumicel", 8, "FFFFFF", 1);
there are still spaces after several of the underscores. I only noticed after running it search on IDS_LOC1_Vierville_Sur_Mer, which only returned one result instead of 2.
ShowTextMarker(-1, 24, 34, "us_victory_marker", 1);
ShowTextMarker(1, 24, 34, "IDS_LOC1_Vierville_ Sur_ Mer", 8, "FFFFFF", 1);
This is incorrect, but I understand your confusion.

Most game scripts use:
ShowEffectMarker(-1, 24, 34, "us_victory_marker", 1);
ShowTextMarker(1, 24, 34, "IDS_LOC1_Vierville_ Sur_ Mer", 8, "FFFFFF", 1);

The effect marker was used to place the VP effect on the map at the beginning of the first turn. But this is now taken care of by the CheckVP commands in the Tick function, so this is nolonger required.
Merr
Captain - Heavy Cruiser
Captain - Heavy Cruiser
Posts: 903
Joined: Mon Aug 16, 2010 2:00 pm

Post by Merr »

adherbal wrote:
there are still spaces after several of the underscores. I only noticed after running it search on IDS_LOC1_Vierville_Sur_Mer, which only returned one result instead of 2.
Oh yeah ... if I squint I can see a couple spaces ... doh
This is incorrect, but I understand your confusion.

Most game scripts use:
ShowEffectMarker(-1, 24, 34, "us_victory_marker", 1);
ShowTextMarker(1, 24, 34, "IDS_LOC1_Vierville_ Sur_ Mer", 8, "FFFFFF", 1);

The effect marker was used to place the VP effect on the map at the beginning of the first turn. But this is now taken care of by the CheckVP commands in the Tick function, so this is nolonger required.
doh! again ... Sorry to confuse you jugger ... Thanks for clarification adherbal
Jugger
Corporal - 5 cm Pak 38
Corporal - 5 cm Pak 38
Posts: 35
Joined: Sun Aug 08, 2010 7:38 am

Post by Jugger »

:? :lol: Guys I had no luck last night/day despite your best efforts. This is my new script which is still showing the same error. Hope you can can help.


IDS_LOC1_Vierville_Sur_Mer, "Vierville Sur Mer",
IDS_LOC2_Draw_1, "Draw 1",
IDS_LOC3_WN_71, "WN 71",
IDS_LOC4_WN_72, "WN 72",
IDS_LOC5_Dog_Green_Sector_Omaha_Beach, "Dog Green Sector Omaha Beach",
IDS_LOC6_Hamel_Au_Petre, "Hamel Au Petre",
IDS_LOC7_Chateau_De_Vaumicel, "Chateau De Vaumicel",


And I put
ShowEffectMarker(-1, 24, 34, "german_victory_marker", 1);
ShowTextMarker(1, 24, 34, "IDS_LOC1_Vierville_Sur_Mer", 8, "FFFFFF", 1);
ShowEffectMarker(-2, 24, 26, "german_victory_marker", 1);
ShowTextMarker(2, 24, 26, "IDS_LOC2_Draw_1", 8, "FFFFFF", 1);
ShowEffectMarker(-3, 26, 26, "german_victory_marker", 1);

ShowTextMarker(3, 26, 26, "IDS_LOC3_WN_71", 8, "FFFFFF", 1);
ShowEffectMarker(-4, 22, 26, "german_victory_marker", 1);
ShowTextMarker(4, 22, 26, "IDS_LOC4_WN_72", 8, "FFFFFF", 1);
ShowEffectMarker(-5, 32, 16, "us_victory_marker", 1);
ShowTextMarker(5, 32, 16, "IDS_LOC5_Dog_Green_Sector_Omaha_Beach", 8, "FFFFFF", 1);
ShowEffectMarker(-6, 74, 26, "german_victory_marker", 1);
ShowTextMarker(6, 74, 26, "IDS_LOC6_Hamel_Au_ Petre", 8, "FFFFFF", 1);
ShowEffectMarker(-7, 32, 43, "german_victory_marker", 1);
ShowTextMarker(7, 32, 43, "IDS_LOC7_Chateau_De_Vaumicel", 8, "FFFFFF", 1);
in my .BSF file.
IainMcNeil
Site Admin
Site Admin
Posts: 13558
Joined: Fri Apr 01, 2005 10:19 am

Post by IainMcNeil »

Can you post your entire bsf file?
Jugger
Corporal - 5 cm Pak 38
Corporal - 5 cm Pak 38
Posts: 35
Joined: Sun Aug 08, 2010 7:38 am

Post by Jugger »

:D Thats is it. :D I just wanted to display the names of the objectives at first, but it looks like I have entered half way into writing a script for victory objectives. This maybe why it does not work? :D
IainMcNeil
Site Admin
Site Admin
Posts: 13558
Joined: Fri Apr 01, 2005 10:19 am

Post by IainMcNeil »

Can you post the exact error you see, copy & paste the error.log file here.
Post Reply

Return to “Battle Academy : Scenario Design”