View previous topic :: View next topic |
Author |
Message |
Baaleos
Joined: 02 Sep 2007 Posts: 830
|
Posted: Sun Apr 10, 2016 22:37 Post subject: GetSurface on linux? |
|
|
I am trying to call nwnx_funcsext's getsurface.
But it keeps returning -1
Log shows following
Quote: |
(S) Request: "GETSURFACE"
(S) Params: "49.901993?9.805523?0.0"
(S) Request: "GETSURFACE"
(S) Params: "49.901993?9.805523?0.0"
(S) Request: "GETSURFACE"
(S) Params: "49.901993?9.805523?0.0"
(S) Request: "GETSURFACE"
|
My call to the script was done via
Code: |
location l = GetLocation(oTester);
vector vPos = GetPositionFromLocation(l);
string str = FloatToString(vPos.x)+"?"+FloatToString(vPos.y)+"?"+FloatToString(vPos.z);
PrintString("NWScript vector version = "+str);
int Surface = GetSurface(l);
PrintString("NWScript Surface is "+IntToString(Surface));
|
Output in the logs are:
Quote: |
NWScript vector version = 49.901992798? 9.805522919? 0.000000000
NWScript Surface is -1
|
|
|
Back to top |
|
|
Baaleos
Joined: 02 Sep 2007 Posts: 830
|
Posted: Mon Apr 11, 2016 14:52 Post subject: |
|
|
Modified the getSurface to use ¬ as the delimiter, and to trim the string before passing to nwnx and it worked. |
|
Back to top |
|
|
|