[hanlp]잘못된곳 있나요? 왜 계속안되죠?
void postit(string header)
{
object room;
string str, filename, body, taget_name, text, text2;
string *lines, tmp, tmp2, tmp3, tmp4;
int s, i, x;
room = environment(this_player());
if(!room) {
return notify_fail(" * 에러!! : 룸의 형식이 맞지 않습니다.\n");
}
str = room->query("파일이름");
if(!str) {
return notify_fail(" * 에러!! : 룸에 파일이름이 없습니다.\n");
}
str = str+".c";
taget_name = read_file(str);
if(!taget_name||taget_name == "") {
return notify_fail("* ("+taget_name+") 파일이 이상합니다.\n");
}
filename = (string)this_player()->query_edit_filename();
body = read_file(filename);
rm(filename);
this_player()->set_edit_filename("");
if (stringp(body) && strlen(body) >= 20*80) {
return notify_fail("* 글이 너무 길어서 저장할 수 없습니다.\n");
}
if( !body || body == 0 ) body = "";
lines = explode(taget_name,"\n");
s = sizeof(lines);
text = text2 = "";
x = 0;
for(i=0;i<s;i++)
{
if( sscanf(lines[i],"%s %s긴설명%s@%s",tmp,tmp2,tmp3,tmp4) == 4 ||
sscanf(lines[i],"%s %s긴설명%s",tmp,tmp2,tmp3) == 3 )
{
x = 1;
continue;
}
else
{
if(
sscanf(lines[i],"%s);",tmp) == 1 ||
sscanf(lines[i],"%s) ;",tmp) == 1 ||
sscanf(lines[i],"%s) ;%s",tmp) == 2 ||
sscanf(lines[i],"%s);%s",tmp, tmp2) == 2)
{
if( x == 1 ) {
x = 2;
continue;
}
}
}
if( x == 0 ) text += lines[i]+"\n";
if( x == 2 ) text2 += lines[i]+"\n";
}
text += "\tset (\"긴설명\",@Zone\n";
text += body;
text += "Zone);\n";
text += text2;
rm(str);
save_file(str,text);
room->set("긴설명",body);
this_player()->room_look(this_player(),room);
return;
}
{
object room;
string str, filename, body, taget_name, text, text2;
string *lines, tmp, tmp2, tmp3, tmp4;
int s, i, x;
room = environment(this_player());
if(!room) {
return notify_fail(" * 에러!! : 룸의 형식이 맞지 않습니다.\n");
}
str = room->query("파일이름");
if(!str) {
return notify_fail(" * 에러!! : 룸에 파일이름이 없습니다.\n");
}
str = str+".c";
taget_name = read_file(str);
if(!taget_name||taget_name == "") {
return notify_fail("* ("+taget_name+") 파일이 이상합니다.\n");
}
filename = (string)this_player()->query_edit_filename();
body = read_file(filename);
rm(filename);
this_player()->set_edit_filename("");
if (stringp(body) && strlen(body) >= 20*80) {
return notify_fail("* 글이 너무 길어서 저장할 수 없습니다.\n");
}
if( !body || body == 0 ) body = "";
lines = explode(taget_name,"\n");
s = sizeof(lines);
text = text2 = "";
x = 0;
for(i=0;i<s;i++)
{
if( sscanf(lines[i],"%s %s긴설명%s@%s",tmp,tmp2,tmp3,tmp4) == 4 ||
sscanf(lines[i],"%s %s긴설명%s",tmp,tmp2,tmp3) == 3 )
{
x = 1;
continue;
}
else
{
if(
sscanf(lines[i],"%s);",tmp) == 1 ||
sscanf(lines[i],"%s) ;",tmp) == 1 ||
sscanf(lines[i],"%s) ;%s",tmp) == 2 ||
sscanf(lines[i],"%s);%s",tmp, tmp2) == 2)
{
if( x == 1 ) {
x = 2;
continue;
}
}
}
if( x == 0 ) text += lines[i]+"\n";
if( x == 2 ) text2 += lines[i]+"\n";
}
text += "\tset (\"긴설명\",@Zone\n";
text += body;
text += "Zone);\n";
text += text2;
rm(str);
save_file(str,text);
room->set("긴설명",body);
this_player()->room_look(this_player(),room);
return;
}
1Comments
천무혼
2004.03.03(수) 오후 04:56:29
obj/Editor/제작기.c 중의 방설명 소스입니다
코멘트를 삭제할 비밀번호를 입력하세요.
정회원 이상만 코멘트 쓰기가 가능합니다.
총 게시물 956개 / 검색된 게시물: 956개
글번호 | 제목 | 작성자 | 조회수 | 좋아요 | 싫어요 | 작성일 | |
---|---|---|---|---|---|---|---|
[기타]질문 답변 외 글은 자유 게시판에 올려 주세요... | 머드클럽 | 4401 | 0 | 0 | 2004-01-01 | ||
316 | [circle] 새천사님의 한써 0.1에 대한 2가지 질문이요! [4] | 무제 | 1865 | 0 | 0 | 2004-03-14 | |
315 | [hanlp] 가장 무식한 방법 [5] | 천무혼 | 1968 | 0 | 0 | 2004-03-09 | |
314 | [circle] 제가요 써클을 한번도 안건드려봤는데요 [8] | 천무혼 | 1847 | 0 | 0 | 2004-03-08 | |
313 | [hanlp] 서버창에 다음과 같은 에러가 뜨는데.. 무슨 에런지? [2] | 탈퇴 | 1861 | 0 | 0 | 2004-03-08 | |
312 | [hanlp] 기술 금지는 없나요.. [3] | 탈퇴 | 1862 | 0 | 0 | 2004-03-07 | |
311 | [hanlp] 제가 뭘 건드렸나본지.. 에러메시지가.. [3] | 천무혼 | 2014 | 0 | 0 | 2004-03-07 | |
310 | [기타] 머드를 만들자는 [3] | 천무혼 | 1918 | 0 | 0 | 2004-03-05 | |
309 | [hanlp] 이런건 어케하나요? [2] | 천무혼 | 1838 | 0 | 0 | 2004-03-05 | |
308 | [hanlp] 에러메세지 질문... [1] | 우울한나 | 1588 | 0 | 0 | 2004-03-04 | |
307 | [hanlp] 아이템의 무게와 부피를 없새고 [5] | 천무혼 | 1820 | 0 | 0 | 2004-03-03 | |
306 | [기타] 머드를 만들고 싶습니다. [8] | 제이칼 | 2167 | 0 | 0 | 2004-03-03 | |
305 | [hanlp] 잘못된곳 있나요? 왜 계속안되죠? [1] | 천무혼 | 2002 | 0 | 0 | 2004-03-03 | |
304 | [hanlp] 방어 마법같은건 어떻게 만들면 좋을까요.. [4] | 박대성 | 1828 | 0 | 0 | 2004-03-03 | |
303 | [hanlp] 값이 정수형인지 문자형인지 판별하는 함수도 있나요? [3] | 탈퇴 | 1780 | 0 | 0 | 2004-03-02 | |
302 | [hanlp] 질문입니다.(제발 제가 질문한거에 답변해주세요) [2] | 천무혼 | 2024 | 0 | 0 | 2004-03-02 | |
301 | [hanlp] 파일 삭제 어떻게 하나요? [4] | 박대성 | 1731 | 0 | 0 | 2004-03-02 | |
300 | [hanlp] 혼님 보세요. [7] | 박대성 | 1880 | 0 | 0 | 2004-03-01 | |
299 | [hanlp] 봐'에 대해 .. [2] | 천무혼 | 1678 | 0 | 0 | 2004-03-01 | |
298 | [hanlp] 머드 강좌란에 보면 그래프 있잖아요 [1] | &미카엘& | 1653 | 0 | 0 | 2004-03-01 | |
297 | [circle] act.other.c:350: warning: statement with no effect [4] | 달 | 2717 | 0 | 0 | 2004-02-29 |