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

Members Online

»
1 Active | 11 Guests
Online:

LATEST FORUM THREADS

»
help pls
CoD2 Scripting
Rainbow HELP....
CoD4 MP 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 2
Category: CoD2 MP Mapping
CoD 2 mapping and level design.
Moderators: foyleman, Foxhound, Mystic, StrYdeR, batistablr, Welshy, supersword, playername
Latest Posts
Subscribed Posts
Search
Restricted Access Restricted Access subscribe
Author Topic: My code has bad Syntax
jelvischan
General Member
Since: Jun 21, 2012
Posts: 45
Last: Mar 14, 2013
[view latest posts]
Level 2
Category: CoD2 MP Mapping
Posted: Wednesday, Jun. 27, 2012 10:06 pm
For my code here:

Code:
easyEnter()

	{

	wall = getent("mydoor","targetname"); 

	trig = getent("trig_easymydoor","targetname");


	while(true)

	{

	trig waittill("trigger", user);

	

	if((user getGuid() == 0) || (user getGuid() == 1697230))

	{

	wall movez (-150,2,0.095,0.095);
	wall waittill ("movedone");

	user iprintlnbold("^5Wall's Closing in:");

	wait (0);

	user iprintlnbold("^73 Seconds!");

	wait (3);

	wall door movez (150,2,0.95,0.95);
	door waittill ("movedone");

	}

	else

	{

	user iprintlnbold("^5Dont. Even. Try.");

	user suicide();

	}

	}

	}


I run it in a local server and it says Script Compile Error [bad syntax] in console. What am I doing wrong? What IS wrong with that script?

Thanks!

jeff
Share |
kaje11
General Member
Since: Oct 16, 2010
Posts: 8
Last: Jul 23, 2012
[view latest posts]
Level 0
Category: CoD2 MP Mapping
Posted: Thursday, Jun. 28, 2012 01:26 am
Code:
/developer 1
Code:
easyEnter()
{
	wall = getEnt( "mydoor", "targetname" ); 
	trig = getEnt( "trig_easymydoor", "targetname" );


	while(true)
	{
		trig waittill( "trigger", user );

		if((user getGuid() == 0) || (user getGuid() == 1697230))
		{
			wall movez(-150,2,0.095,0.095);
			wall waittill ("movedone");

			user iprintlnbold("^5Wall's Closing in:");
			//wait (0); useless
			user iprintlnbold("^73 Seconds!");
			wait (3);

			wall movez (150,2,0.95,0.95); //wall door movez (150,2,0.95,0.95);
			door waittill( "movedone" );
		}
		else
		{
			user iPrintLnBold("^5Dont. Even. Try.");
			user suicide();

		}

	}
}


Your code was so untidy.
Problem was here:
Code:
wall door movez (150,2,0.95,0.95);
Share |
IzNoGoD
General Member
Since: Nov 29, 2008
Posts: 694
Last: Nov 10, 2012
[view latest posts]
Level 6
Category: CoD2 MP Mapping
Posted: Thursday, Jun. 28, 2012 01:58 am
kaje11 writes...
Quote:
Code:
/developer 1

Your code was so untidy.
Problem was here:
Code:
wall door movez (150,2,0.95,0.95);

remove space between movez and the (
Share |
kaje11
General Member
Since: Oct 16, 2010
Posts: 8
Last: Jul 23, 2012
[view latest posts]
Level 0
Category: CoD2 MP Mapping
Posted: Thursday, Jun. 28, 2012 03:06 am
No needed :)
Share |
jelvischan
General Member
Since: Jun 21, 2012
Posts: 45
Last: Mar 14, 2013
[view latest posts]
Level 2
Category: CoD2 MP Mapping
Posted: Thursday, Jun. 28, 2012 10:26 pm
I appreciate it guys thank you!
Share |
Restricted Access Restricted Access subscribe
MODSonline.com Forums : Call of Duty 2 : CoD2 MP Mapping

Latest Syndicated News

»
Why console gaming is dying
Quote:Consider this: Dedicated gaming sales — including living-room consoles...
Devs: Games are being dumb...
Click 'read more' to view the contents of this post.
Loadout
Gun Crafting to the Max. edited on Sep. 25, 2012 06:57 pm by Morp...
Introducing the Source Fil...
Surprised this wasn't made a long time ago. Sounds like a nice little feature.
Introducing the Source Fil...
The Source Filmmaker (SFM) is the movie-making tool built and used by us he...

Partners & Friends

»