Jump to content
  • 0

Error : script error on npc/custom/new_train_ground.txt line 402 need '('


Dolphin86

Question


  • Group:  Members
  • Topic Count:  255
  • Topics Per Day:  0.06
  • Content Count:  706
  • Reputation:   16
  • Joined:  01/07/12
  • Last Seen:  

i been staring at this script and i cant find what was missing.. can someone help me find what was wrong?

script :

Spoiler
new_1-3,90,53,5	script	Dudu	474,{
	
	if(Cooking == 1) goto Cooking1; // Line 402 is here //
	if(Cooking == 2) goto Cooking2; 
	if(Cooking == 3) goto Cooking3;

	soundeffect "menu.wav",0;
	mes "Oh !, hello there child";
	mes "how can i help you ?";
	next;
	soundeffect "menu.wav",0;
	switch(select("- What are you doing ?:- Nothing")){
		case 1:
			soundeffect "menu.wav",0;
			mes "Well i am cooking Satey";
			mes "it's good recover your";
			mes "health..";
			next;
			switch(select("- Can you teach me ?:- Good Bye")){
				case 1:
					soundeffect "menu.wav",0;
					mes "Oh !, sure it's easy";
					mes "bring me 10 branch";
					mes "and 10 Monster loot";
					mes "and i teach you how";
					next;
					soundeffect "menu.wav",0;
					mes "Want to give it a try?";
					switch(select("- Yes !:- Good Bye")){
						case 1:
							soundeffect "menu.wav",0;
							mes "Great, now gather";
							mes "10 Branch and";
							mes "10 Monster Loot";
							next;
							soundeffect "menu.wav",0;
							mes "come back when you have it";
							set Cooking,1;
							close3;
						case 2:
							soundeffect "menu.wav",0;
							mes "Well, com back if you want to learn it";
							close3;
					}
				case 2:
					soundeffect "menu.wav",0;
					mes "Good bye child";
					close3;
					
			}
			
		case 2:
			soundeffect "menu.wav",0;
			mes "Good bye child..";
			close3;
			
	}
Cooking1:
	if(countitem(40006) < 10 || countitem(40023) < 10){
		soundeffect "menu.wav",0;
		mes "^ff0000 My child, you dont have";
		mes "10 Monster Loot and";
		mes "10 Branch.. ^000000";
		next;
		soundeffect "menu.wav",0;
		mes "Come back when you have";
		mes "10 Branch and 10 Monster Loot";
		close3;
	}
	soundeffect "menu.wav",0;
	mes "Great work child";
	mes "now on this Bon Fire";
	mes "select Grill Meat Satey";
	next;
	soundeffect "menu.wav",0;
	mes "Once you have Meat Satey";
	mes "talk to me again";
	set Cooking,2;
	close3;
	
Cooking2:
	if(countitem(40036) < 1){
		soundeffect "menu.wav",0;
		mes "Where are the Meat Satey?";
		mes "On the BonFire Select";
		mes "Grill Meat Satey";
		close3;
	}
	soundeffect "menu.wav",0;
	mes "That was easy right?";
	mes "the more you cook";
	mes "more dish you can make";
	mes "as long you have all";
	mes "ingredients.";
	atcommand "@jlvl 1";
	atcommand "@blvl 1";
	set Cooking,3;
	close3;
	
Cooking3:
	soundeffect "menu.wav",0;
	mes "Hello child, i hope everything is good eh?";
	close3;
}

 

 

Edited by Dolphin86
Link to comment
Share on other sites

2 answers to this question

Recommended Posts

  • 0

  • Group:  Members
  • Topic Count:  0
  • Topics Per Day:  0
  • Content Count:  132
  • Reputation:   53
  • Joined:  06/02/12
  • Last Seen:  

Hi. "cooking" is a script command. You can't use it as a variable name. Just rename the variable to something else.

Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  11
  • Topics Per Day:  0.00
  • Content Count:  298
  • Reputation:   47
  • Joined:  03/30/13
  • Last Seen:  

4 hours ago, Dolphin86 said:

i been staring at this script and i cant find what was missing.. can someone help me find what was wrong?

script :

  Hide contents
new_1-3,90,53,5	script	Dudu	474,{
	
	if(Cooking == 1) goto Cooking1; // Line 402 is here //
	if(Cooking == 2) goto Cooking2; 
	if(Cooking == 3) goto Cooking3;

	soundeffect "menu.wav",0;
	mes "Oh !, hello there child";
	mes "how can i help you ?";
	next;
	soundeffect "menu.wav",0;
	switch(select("- What are you doing ?:- Nothing")){
		case 1:
			soundeffect "menu.wav",0;
			mes "Well i am cooking Satey";
			mes "it's good recover your";
			mes "health..";
			next;
			switch(select("- Can you teach me ?:- Good Bye")){
				case 1:
					soundeffect "menu.wav",0;
					mes "Oh !, sure it's easy";
					mes "bring me 10 branch";
					mes "and 10 Monster loot";
					mes "and i teach you how";
					next;
					soundeffect "menu.wav",0;
					mes "Want to give it a try?";
					switch(select("- Yes !:- Good Bye")){
						case 1:
							soundeffect "menu.wav",0;
							mes "Great, now gather";
							mes "10 Branch and";
							mes "10 Monster Loot";
							next;
							soundeffect "menu.wav",0;
							mes "come back when you have it";
							set Cooking,1;
							close3;
						case 2:
							soundeffect "menu.wav",0;
							mes "Well, com back if you want to learn it";
							close3;
					}
				case 2:
					soundeffect "menu.wav",0;
					mes "Good bye child";
					close3;
					
			}
			
		case 2:
			soundeffect "menu.wav",0;
			mes "Good bye child..";
			close3;
			
	}
Cooking1:
	if(countitem(40006) < 10 || countitem(40023) < 10){
		soundeffect "menu.wav",0;
		mes "^ff0000 My child, you dont have";
		mes "10 Monster Loot and";
		mes "10 Branch.. ^000000";
		next;
		soundeffect "menu.wav",0;
		mes "Come back when you have";
		mes "10 Branch and 10 Monster Loot";
		close3;
	}
	soundeffect "menu.wav",0;
	mes "Great work child";
	mes "now on this Bon Fire";
	mes "select Grill Meat Satey";
	next;
	soundeffect "menu.wav",0;
	mes "Once you have Meat Satey";
	mes "talk to me again";
	set Cooking,2;
	close3;
	
Cooking2:
	if(countitem(40036) < 1){
		soundeffect "menu.wav",0;
		mes "Where are the Meat Satey?";
		mes "On the BonFire Select";
		mes "Grill Meat Satey";
		close3;
	}
	soundeffect "menu.wav",0;
	mes "That was easy right?";
	mes "the more you cook";
	mes "more dish you can make";
	mes "as long you have all";
	mes "ingredients.";
	atcommand "@jlvl 1";
	atcommand "@blvl 1";
	set Cooking,3;
	close3;
	
Cooking3:
	soundeffect "menu.wav",0;
	mes "Hello child, i hope everything is good eh?";
	close3;
}

 

 

Your script doesn't reach line 402

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...