Sign in to follow this  
Followers 0
antocro

Error bad syntax (PLEASE HELP)

22 posts in this topic

Help to new error in map!

trap1()
{
	trig=getEnt(trap1_trig","targetname");
	trap=getEnt(trap1","targetname");
	hurt=getEnt(trap1_hurt","targetname");
	trig sethintstring("Press [USE] to activate Trap 1");
	trig waittill(trigger");
	trig delete();
	
	hurt enablelinkto();
	hurt linkto(trap);
	
	trap movez(80,2);
	wait 4;
	trap movez(80,2);
	
	mover movey(-320, 4)
	mover waittill("movedone");
	wait 6;
}

92449327938194587147.png

0

Share this post


Link to post
Share on other sites

You're missing a quotation mark after =getent(

and after trig waittill(

Make sure you always have a " either side of the words

0

Share this post


Link to post
Share on other sites

Stop posting your problems in the map release section please.

0

Share this post


Link to post
Share on other sites

Sorry but where do they ask?

In the coding/mapping HELP section

0

Share this post


Link to post
Share on other sites

I have new problem!

 

	mover movey(-320, 4)
	mover waittill("movedone");
	wait 6;

Missing a ; after (-320, 4)

 

Do you even look for errors before you ask us?

0

Share this post


Link to post
Share on other sites

Send that part of the script

    mover movey(-320, 4);
    mover waittill("movedone");
    wait 6;
0

Share this post


Link to post
Share on other sites
    mover movey(-320, 4);
    mover waittill("movedone");
    wait 6;

The part where you defined 'mover'

 

EDIT: 

you haven't defined what mover is.

Or that :dumb:

0

Share this post


Link to post
Share on other sites

Where you defined it in the script...

 

ie, mover = getEnt( "namehere", "targetname" );

0

Share this post


Link to post
Share on other sites

Its full script for this trap!

trap1()
{
	trig=getEnt("trap1_trig","targetname");
	trap=getEnt("trap1","targetname");
	hurt=getEnt("trap1_hurt","targetname");
	trig sethintstring("Press [USE] to activate Trap 1");
	trig waittill("trigger");
	trig delete();
	
	hurt enablelinkto();
	hurt linkto(trap);
	
	trap movez(80,2);
	wait 4;
	trap movez(80,2);
	
	mover movey(-320, 4);
	mover waittill("movedone");
	wait 6;
}
0

Share this post


Link to post
Share on other sites

You haven't defined 'mover' ...............

 

 

ie, mover = getEnt( "namehere", "targetname" );

0

Share this post


Link to post
Share on other sites

 

Its full script for this trap!

trap1()
{
	trig=getEnt("trap1_trig","targetname");
	trap=getEnt("trap1","targetname");
	hurt=getEnt("trap1_hurt","targetname");
	trig sethintstring("Press [USE] to activate Trap 1");
	trig waittill("trigger");
	trig delete();
	
	hurt enablelinkto();
	hurt linkto(trap);
	
	trap movez(80,2);
	wait 4;
	trap movez(80,2);
	
	mover movey(-320, 4);
	mover waittill("movedone");
	wait 6;
}

 

:Facepalm:

 

Maybe like this?

trap1()
{
	trig=getEnt("trap1_trig","targetname");
	mover=getEnt("trap1","targetname");
	hurt=getEnt("trap1_hurt","targetname");
	trig sethintstring("Press [USE] to activate Trap 1");
	trig waittill("trigger");
	trig delete();
	
	hurt enablelinkto();
	hurt linkto(trap);
	
	mover movez(80,2);
	wait 4;
	mover movez(80,2);
	
	mover movey(-320, 4);
	mover waittill("movedone");
	wait 6;
}

Problem was this.. trap=getEnt("trap1","targetname");

0

Share this post


Link to post
Share on other sites
    hurt=getEnt("trap1_hurt","targetname");

'mover' is the variable you created, however it look like you named it 'hurt'. Try replacing 'mover' with 'hurt' and see if that works.

 

I'm assuming the thing you want to move is the hurt trigger as that's what you quoted.

 

As for Bosnian, Giving him a script (that almost won't work) without even trying to explain a thing will do no help what so ever.

 

EDIT: I'm going to work now so won't be able to help you for a few hours, a word of advice; make sure you understand what you're doing before you do it.

Oh, and don't listen to Bosnian :troll:

EVER. :troll:

0

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
Sign in to follow this  
Followers 0