logo logo

 Back to main page

The NWNX Community Forum

 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 
 
GetSurface on linux?

 
Post new topic   Reply to topic    nwnx.org Forum Index -> Linux technical support
View previous topic :: View next topic  
Author Message
Baaleos



Joined: 02 Sep 2007
Posts: 830

PostPosted: Sun Apr 10, 2016 22:37    Post subject: GetSurface on linux? Reply with quote

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
View user's profile Send private message
Baaleos



Joined: 02 Sep 2007
Posts: 830

PostPosted: Mon Apr 11, 2016 14:52    Post subject: Reply with quote

Modified the getSurface to use ¬ as the delimiter, and to trim the string before passing to nwnx and it worked.
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    nwnx.org Forum Index -> Linux technical support All times are GMT + 2 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group