|
|
WNT~~~
這個檔案編譯的時候沒問題
但是在使用的時候(go)會出現找不到物件的問題
是不是回傳的字串的寫法不對?
-----------------------
//_m9_m3.C
inherit ROOM;
#include <ansi.h>
string n_mean_sit(int x,int y){
int t = y+1;
if(x < 0){
if(t<0) return "_m"+x+"_m"+t;
else return "_m"+x+"_"+t;
}
else{
if(t<0) return "_"+x+"_m"+t;
else return "_"+x+"_"+t;
}
}
string s_mean_sit(int x,int y){
int t = y-1;
if(x < 0){
if(t<0) return "_m"+x+"_m"+t;
else return "_m"+x+"_"+t;
}
else{
if(t<0) return "_"+x+"_m"+t;
else return "_"+x+"_"+t;
}
}
string w_mean_sit(int x,int y){
int t = x -1;
if(y < 0){
if(t < 0) return "_m"+t+"_m"+y;
else return "_"+t+"_m"+y;
}
else{
if(t < 0) return "_m"+t+"m"+y;
else return "_"+t+"m"+y;
}
}
string e_mean_sit(int x,int y){
int t = x +1;
if(y < 0){
if(t < 0) return "_m"+t+"_m"+y;
else return "_"+t+"_m"+y;
}
else{
if(t < 0) return "_m"+t+"m"+y;
else return "_"+t+"m"+y;
}
}
void create()
{
//------05--------10--------15--------20--------25----28--30
set("long",@LONG
小草平鋪於地,雖無人整治,卻顯得格外嬌小可愛,或許是因此
處露出地表不久吧?北方同為大片草地,而夢湖,似乎就在西北方位
。
LONG);
set("short",HIG"草原"HIW"(-9,-3)"NOR);
set("exits",([
"east":__DIR__"%c",
"west":__DIR__+w_mean_sit(-9,-3),
"north":__DIR__+n_mean_sit(-9,-3),
"south":__DIR__+s_mean_sit(-9,-3),
])e_mean_sit(-9,-3));
setup();
replace_program(ROOM);
} |
|