|
看到以前的贴已经沉了~~于是新发一个~~
问:
现在我已经将一切做好了。
但是创建新地图,后导入common.j之后。发现出现如下错误:
【未发现的本地函数。】
我仔细检查。发现应该是.xjp的链接出了些问题。
但是未发现与教程中相异的错误。
现发
组建步骤,请japi强人为我解答一下:
1.创建.dll工程(我用VC6.0)。
2.将.cpp文件传入工程。
3.组建.dll文件。
4.将.dll文件直接重命名为.xjp文件。
5.将.xjp复制到\jNatives目录下。
6.将japi.lst的内容改为jNatives\DataLibrary.xjp(我的.xjp文件的名字)
7.运行weloader.exe。
8.创建新地图,导入common.j。
9.显示错误。
希望高人解答~~
附:
jAddNative的代码:
[codes=C++] jAddNative(InitDataLibrary,"InitDataLibrary","(II)I");
jAddNative(FlushDataLibrary,"FlushDataLibrary","(I)I");
jAddNative(SettingLibrary,"SettingLibrary","(I)V");
jAddNative(SettingLibraryNull,"SettingLibraryNull","(V)V");
jAddNative(GetRightLibrary,"GetRightLibrary","(I)I");
jAddNative(GetIndexLine,"GetIndexLine","(I)I");
jAddNative(InitNewLine,"InitNewLine","(III)I");
jAddNative(LibraryAddNext,"LibraryAddNext","(I)I");
jAddNative(FlushLine,"FlushLine","(I)V");
jAddNative(InitLibraryLines,"InitLibraryLines","(I)V");
//above is library's jass native
jAddNative(SettingLine,"SettingLine","(I)V");
jAddNative(SettingLineNull,"SettingLineNull","(V)V");
jAddNative(SetLineInt,"SetLineInt","(II)V");
jAddNative(SetLineReal,"SetLineReal","(IR)V");
jAddNative(SetLineStr,"SetLineStr","(IS)V");
jAddNative(GetLineInt,"GetLineInt","(I)I");
jAddNative(GetLineReal,"GetLineReal","(I)R");
jAddNative(GetLineStr,"GetLineStr","(I)S");
jAddNative(GetRightLine,"GetRightLine","(I)I");
jAddNative(GetIndexNode,"GetIndexNode","(I)I");
jAddNative(InitNewNode,"InitNewNode","(II)I");
jAddNative(LineAddNext,"LineAddNext","(II)I");
jAddNative(FlushNode,"FlushNode","(I)V");
jAddNative(InitLineElements,"InitLineElements","(I)V");
jAddNative(InitLineNodes,"InitLineNodes","(I)V");
//above is line's jass native
jAddNative(SettingNode,"SettingNode","(I)V");
jAddNative(SettingNodeNull,"SettingNodeNull","(V)V");
jAddNative(SetNodeInt,"SetNodeInt","(II)V");
jAddNative(SetNodeReal,"SetNodeReal","(IR)V");
jAddNative(SetNodeStr,"SetNodeStr","(IS)V");
jAddNative(GetNodeInt,"GetNodeInt","(I)I");
jAddNative(GetNodeReal,"GetNodeReal","(I)R");
jAddNative(GetNodeStr,"GetNodeStr","(I)S");
jAddNative(GetRightNode,"GetRightNode","(I)I");
jAddNative(NodeAddNext,"NodeAddNext","(I)I");
jAddNative(InitNodeElements,"InitNodeElements","(I)V");
//above is node's jass native[/codes]
common.j添加的内容:
[codes=jass]native InitDataLibrary takes integer index, integer size returns integer
//index = num of library(0-9), size = line size
native FlushDataLibrary takes integer index returns integer
//index = num of library(0-9)
native SettingLibrary takes integer pLibrary returns nothing
//setting library = plibrary
native SettingLibraryNull takes nothing returns nothing
native GetRightLibrary takes integer index returns integer
native GetIndexLine takes integer index returns integer
//index = location of line
native InitNewLine takes integer index, integer N_Num, integer E_Num returns integer
//index = location of line, N_Num = line's node size, E_Num = line's element size
native LibraryAddNext takes integer num returns integer
//num = line size
native FlushLine takes integer index returns nothing
//index = location of line
native InitLibraryLines takes integer L_Num returns nothing
//L_Num = line size
//above are library's jass natives
native SettingLine takes integer pLine returns nothing
//setting line = pline
native SettingLineNull takes nothing returns nothing
//below are work of setting line
native SetLineInt takes integer index, integer value returns nothing
native SetLineReal takes integer index, real value returns nothing
native SetLineStr takes integer index, string value returns nothing
native GetLineInt takes integer index returns integer
native GetLineReal takes integer index returns real
native GetLineStr takes integer index returns string
//index = location of element
native GetRightLine takes integer index returns integer
//index = location of node
native GetIndexNode takes integer index returns integer
//index = location of node
native InitNewNode takes integer index, integer num returns integer
//num = Element size, index = location of node
native LineAddNext takes integer num, integer E_Num returns integer
//num = Node size, E_Num = Element size
native FlushNode takes integer index returns nothing
//index = location of node
native InitLineElements takes integer E_Num returns nothing
native InitLineNodes takes integer N_Num returns nothing
//N_Num = Node size, E_Num = Element size
//above are line's jass natives
native SettingNode takes integer pNode returns nothing
//setting node = pnode
native SettingNodeNull takes nothing returns nothing
//below are work of setting node
native SetNodeInt takes integer index, integer value returns nothing
native SetNodeReal takes integer index, real value returns nothing
native SetNodeStr takes integer index, string value returns nothing
native GetNodeInt takes integer index returns integer
native GetNodeReal takes integer index returns real
native GetNodeStr takes integer index returns string
native GetRightNode takes integer index returns integer
//index = location of element
native NodeAddNext takes integer E_Num returns integer
native InitNodeElements takes integer E_Num returns nothing
//E_Num = Element size
//above are node's jass natives
[/codes] |
|