13 Mar, 2010, yamtara wrote in the 1st comment:
Votes: 0
here is the error and i cant find whats wrong whit this


quest.c:223: error: missing terminating " character
quest.c:235: error: To undeclared (first use in this function)
quest.c:235: error: (Each undeclared identifier is reported only once
quest.c:235: error: for each function it appears in.)
quest.c:235: error: expected ) before buy
quest.c:235:22: warning: character constant too long for its type
quest.c:235: error: stray \ in program
quest.c:235: error: stray \ in program
quest.c:235:45: warning: missing terminating " character
quest.c:235: error: missing terminating " character
quest.c:236: warning: format not a string literal and no format arguments


here is the kod

214 bufvampire[0] = '\0';
215 if ( ch->class == CLASS_VAMPIRE )
216 sprintf(bufvampire," 50qp………Vampire skill (vampire)\n\r");
217 bufsamurai[0] = '\0';
218 if ( ch->class == 9 )
219 sprintf(bufsamurai,"%s%s%s",
220 " 100qp………Katana quest (katana)\n\r",
221 " 100qp………Second katana quest(sharp)\n\r",
222 " 50qp………Decrease number of death (death)\n\r");
223 sprintf(buf, "Current Quest Items available for Purchase:\n\r\
224 5000qp………the silk-adamantite backpack (backpack)\n\r\
225 1000qp………the Girth of Real Heroism (girth)\n\r\
226 1000qp………the Ring of Real Heroism (ring)\n\r\
227 1000qp………the Real Hero's Weapon (weapon)\n\r\
228 1000qp………100 Practices (practice)\n\r\
229 500qp………Decanter of Endless Water (decanter)\n\r\
230 500qp………350,000 gold pieces (gold)\n\r\
231 250qp………1 constitution (con)\n\r\
232 200qp………tattoo of your religion (tattoo)\n\r%s%s\
233 50qp………remove tattoo of your religion (remove)\n\r\
234 50qp………set religion to none (set)\n\r
235 To buy an item, type 'QUEST BUY <item>'.\n\r",
236 bufsamurai, bufvampire);
237 send_to_char(buf, ch);
238 return;
13 Mar, 2010, Runter wrote in the 2nd comment:
Votes: 0
You only need to post the same question in one place. See my post on the other thread. -_-
13 Mar, 2010, yamtara wrote in the 3rd comment:
Votes: 0
i know but cant find answer yet game terminate becaus of this i ame trying to find whats wrong…


<Yakuza: 1703hp 2245m 2270mv Opp:<None!>> q list
*** buffer overflow detected ***: ../src/anatolia terminated
13 Mar, 2010, yamtara wrote in the 4th comment:
Votes: 0
:tongue:
13 Mar, 2010, Deimos wrote in the 5th comment:
Votes: 0
quest.c:223: error: missing terminating " character

It's telling you exactly what the problem is. This means that it's trying to find the terminating " character for the end of the string, but it can't (because you put a line break inside the string). You can't break strings up across multiple lines like this. You need to use the correct syntax for multiline string constants:

sprintf(buf, "Current Quest Items available for Purchase:\n\r"
"5000qp………the silk-adamantite backpack (backpack)\n\r"
/* …etc. Note that each piece of the string is double quote delimited. */
13 Mar, 2010, Deimos wrote in the 6th comment:
Votes: 0
Hmm. I just noticed that you're escaping your line breaks to get around this, so if you don't want to use the notation I posted above, you could also just fix this line:

50qp………set religion to none (set)\n\r

By adding the backslash on the end of it.
13 Mar, 2010, Runter wrote in the 7th comment:
Votes: 0
Deimos said:
Hmm. I just noticed that you're escaping your line breaks to get around this, so if you don't want to use the notation I posted above, you could also just fix this line:

50qp………set religion to none (set)\n\r

By adding the backslash on the end of it.


They've already been helped on a different thread. For some reason they posted twice the same question in different places.
13 Mar, 2010, yamtara wrote in the 8th comment:
Votes: 0
i changed the code like this ant it is work normal

act("QUESTER offers the following EQUIPMENT.",ch,NULL,questman,TO_CHAR);
send_to_char(" 5000qp………the silk-adamantite backpack (backpack)\n\r",ch);
send_to_char(" 1000qp………the Girth of Real Heroism (girth)\n\r",ch);
send_to_char(" 1000qp………the Ring of Real Heroism (ring)\n\r",ch);
send_to_char(" 1000qp………the Real Hero's Weapon (weapon)\n\r",ch);
send_to_char(" 1000qp………100 Practices (practice)\n\r",ch);
send_to_char(" 500qp………Decanter of Endless Water (decanter)\n\r",ch);
send_to_char(" 500qp………Decanter of Endless Water (decanter)\n\r",ch);
send_to_char(" 500qp………350,000 gold pieces (gold)\n\r",ch);
send_to_char(" 250qp………1 constitution (con)\n\r",ch);
send_to_char(" 200qp………tattoo of your religion (tattoo)\n\r",ch);
send_to_char(" 50qp………remove tattoo of your religion (remove)\n\r",ch);
send_to_char(" 50qp………set religion to none (set)\n\r",ch);

send_to_char(" To buy an item, type 'QUEST BUY <item>'.",ch);
return;
}


and in game when i write it quest list

<Yakuza: 2513hp 2245m 2270mv Opp:<None!>> q list
You ask Questor for a list of quest items.
QUESTER offers the following EQUIPMENT.
5000qp………the silk-adamantite backpack (backpack)
1000qp………the Girth of Real Heroism (girth)
1000qp………the Ring of Real Heroism (ring)
1000qp………the Real Hero's Weapon (weapon)
1000qp………100 Practices (practice)
500qp………Decanter of Endless Water (decanter)
500qp………Decanter of Endless Water (decanter)
500qp………350,000 gold pieces (gold)
250qp………1 constitution (con)
200qp………tattoo of your religion (tattoo)
50qp………remove tattoo of your religion (remove)
50qp………set religion to none (set)
To buy an item, type 'QUEST BUY <item>'.
13 Mar, 2010, yamtara wrote in the 9th comment:
Votes: 0
lol lol
there is mistake again i write 2 time

500qp………Decanter of Endless Water (decanter)
500qp………Decanter of Endless Water (decanter)

lol
0.0/9