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

Members Online

»
0 Active | 61 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: CoDUO Mapping
CoD United Offensive mapping and level design.
Moderators: foyleman, Foxhound, Mystic, StrYdeR, batistablr, Welshy, DrBiggzz, supersword
Latest Posts
Subscribed Posts
Search
Restricted Access Topic is Locked subscribe
Author Topic: Need help with syntax
ITOE_MC
General Member
Since: Sep 3, 2006
Posts: 342
Last: Nov 12, 2009
[view latest posts]
Level 5
Category: CoDUO Mapping
Posted: Saturday, Jul. 21, 2007 03:52 pm
I'm modding the quickmessages for UO through the _teams.gsc. I already have the soundaliases set up. I want to make it so one of the selected statements has three possible sound files/quotes, but I can't seem to make more than two work at one time. When I try three, I get a "bad syntax" error. This is my syntax (which I know is wrong):

case "3":
temp = randomInt(3);

if(temp)
{
soundalias = "american_enemy_sighted1";
saytext = "We've got enemy movement in this sector.";
}
else
{
soundalias = "american_enemy_sighted2";
saytext = "Movement!";
}
else
{
soundalias = "american_enemy_sighted3";
saytext = "Target sighted!";
}
break;

(I put the printed quote right in _teams so I wouldn't have to mess with the relevant localizedstrings files. It works so far.)

Can anyone tell me what I'm doing wrong?

Thanks.

edited on Jul. 21, 2007 11:53 am by ITOE_MC
Share |
Futtbucker
General Member
Since: Jun 23, 2006
Posts: 96
Last: Jul 21, 2007
[view latest posts]
Level 3
Category: CoDUO Mapping
Posted: Saturday, Jul. 21, 2007 04:05 pm
I had the same problem, maybe you can find something in this topic.
Share |
.KiLL3R.
General Member
Since: Oct 26, 2006
Posts: 1437
Last: Jul 3, 2017
[view latest posts]
Level 8
Category: CoDUO Mapping
Posted: Saturday, Jul. 21, 2007 04:17 pm
u can only have 1 else on the if things, so it should be this:

case "3":
temp = randomInt(3);

if(temp == 0)
{
soundalias = "american_enemy_sighted1";
saytext = "We've got enemy movement in this sector.";
}
else if(temp == 1)
{
soundalias = "american_enemy_sighted2";
saytext = "Movement!";
}
else if(temp == 2)
{
soundalias = "american_enemy_sighted3";
saytext = "Target sighted!";
}
break;

yes, it says randomInt(3) but it does 0,1,2 not the number 3
Share |
ITOE_MC
General Member
Since: Sep 3, 2006
Posts: 342
Last: Nov 12, 2009
[view latest posts]
Level 5
Category: CoDUO Mapping
Posted: Saturday, Jul. 21, 2007 04:50 pm
Thanks for responding, and so quickly. I've never written a program in any language, so I'm very grateful for your help.
Share |
EL_Zoido
General Member
Since: Dec 8, 2008
Posts: 5
Last: Jun 27, 2012
[view latest posts]
Level 0
Category: CoDUO Mapping
Posted: Saturday, Jun. 26, 2010 03:24 am
I bump this post because I want to do the same thing but above solutions do not help. I have set it up just like this (and tried some other ways) but it only plays the stock files. There are no errors, but my sounds do not play.
I tried to do it with 'US move in' (has 3 sounds/quotes in stock) and 'US suppressing fire' (1 sound/quote in stock)

I have these files
soundloadspecs/mp/mp_ponyri.csv (from awe v2.1 client)
soundaliases/dialog_mp.csv (from main/pak1)
maps/mp/gametypes/_teams.gsc (from uo/pakuo01)

I have checked many times the csv files, they all link each other and the sound files as they should.
Below is my Us move in from _teams, the suppressing fire is the same with different sound names etc
Code:
case "2":
                                temp = randomInt(3);

				if(temp == 0)
				{
					soundalias = "american_move1";
					saytext = "Move in!";
				}
				else if(temp == 1)
				{
					soundalias = "american_move2";
					saytext = "Go go go!";
				}
				else
				{
					soundalias = "american_move3";
					saytext = "Go go go!";
				}
				break;

Am I missing something? I am not much into this kind of modding but I feel like COD is ignoring my _teams file and just using stock.
Share |
EL_Zoido
General Member
Since: Dec 8, 2008
Posts: 5
Last: Jun 27, 2012
[view latest posts]
Level 0
Category: CoDUO Mapping
Posted: Tuesday, Jul. 13, 2010 11:30 am
I realised what I was doing wrong here. When I was putting together my pk3 I was accidentally missing out one of the gsc files I needed. Oopsie
Share |
Restricted Access Topic is Locked subscribe
MODSonline.com Forums : Call of Duty : CoDUO 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

»