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 
 
Using this script, crashes game

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



Joined: 28 Nov 2007
Posts: 135

PostPosted: Sat Aug 02, 2008 22:16    Post subject: Using this script, crashes game Reply with quote

Whe ever i click a crystal with this script on used, the server reboots. I dont know why and i am not sure where to look to find out the reason.

Code:
//:: set_subraces                                                           :://
//:: Created by Extreme on 08/01/08                                         :://
//:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::://
//:: Sets the subrace by reading the name of the crystal used and setting   :://
//:: the subrace to the exact name of the crystal.                          :://
//:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::://
//:: Read the local int BaseRace, and set the racial type to the int        :://
//:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::://

#include "nwnx_functions"
void main()
{
string sSubrace = GetName(OBJECT_SELF);
int nBaseRace = GetLocalInt(OBJECT_SELF, "BaseRace");

    SetRacialType(GetLastUsedBy(), nBaseRace);
    SetSubRace(GetLastUsedBy(), sSubrace);

}
Back to top
View user's profile Send private message
addicted2rpg



Joined: 01 Aug 2008
Posts: 106

PostPosted: Sun Aug 03, 2008 1:33    Post subject: Reply with quote

I take it that script is on a living creature or the like? I'm worried about what some of those are evaluating to (it would be no sense to get the race of, say, a weapon or a table which could be what OBJECT_SELF is set to).

When in doubt, print them out. If you want to be really careful, make sure the stuff it prints out is in the corresponding 2da files (racialtypes.2da etc..)
Back to top
View user's profile Send private message
virusman



Joined: 30 Jan 2005
Posts: 1020
Location: Russia

PostPosted: Sun Aug 03, 2008 3:25    Post subject: Reply with quote

SetRacialType is an NWNX function and several people have reported that it doesn't work with 1.69. Make sure you're using the latest version. If the crash occurs with the latest available version, you'll have to wait for a new release. I can't put a fix for this until September, but Acaos might be able to fix it if you ask him nicely. Smile
Back to top
View user's profile Send private message Visit poster's website Yahoo Messenger
Extreme



Joined: 28 Nov 2007
Posts: 135

PostPosted: Sun Aug 03, 2008 7:19    Post subject: Reply with quote

well its on placeables. The cystal appearance in Custom>Misc. This all wraps thru Shayan's (SSE). should u get a subrace or pick on that requires a base race change, u go to a room where they are. You use the crystal and it sets the Subrace and racial type. Then u relogg and the leto catches you this time and forces the relogg again and when ur back, all is done.

now I was testing this on a creature that had already had successfull SSE edits thru leto. didn't have time to fully test today since I'm omw to work now. I hope to test this from other angles today as well as seperate the two functions to fire seperate seperately.

Hey virusman, how should the function work? cause I want to test it fully and get all the info I can to u. does it require a relogg, like leto?
does it use leto?
Where should any errors or progress be written to so I can check the relevent logs?
I'm still learning linux, so I don't know fully what segfault is, but when we were segfaulting before...it was just like this. but I don't know where to look in the shell or logs

oh and prettttttty prettttttty please Acaos :beg:
Back to top
View user's profile Send private message
virusman



Joined: 30 Jan 2005
Posts: 1020
Location: Russia

PostPosted: Sun Aug 03, 2008 8:39    Post subject: Reply with quote

Extreme wrote:
well its on placeables. The cystal appearance in Custom>Misc. This all wraps thru Shayan's (SSE). should u get a subrace or pick on that requires a base race change, u go to a room where they are. You use the crystal and it sets the Subrace and racial type. Then u relogg and the leto catches you this time and forces the relogg again and when ur back, all is done.

now I was testing this on a creature that had already had successfull SSE edits thru leto. didn't have time to fully test today since I'm omw to work now. I hope to test this from other angles today as well as seperate the two functions to fire seperate seperately.

Hey virusman, how should the function work? cause I want to test it fully and get all the info I can to u. does it require a relogg, like leto?
does it use leto?
Where should any errors or progress be written to so I can check the relevent logs?
I'm still learning linux, so I don't know fully what segfault is, but when we were segfaulting before...it was just like this. but I don't know where to look in the shell or logs

oh and prettttttty prettttttty please Acaos :beg:
It doesn't use Leto so the changes are applied immediately. If it crashes every time you call it, then logs won't show anything. I (or Acaos) will check if the offset has been changed in 1.69 (which appears to be the case) and update the source with the correct value. Until then, you'll have to wait and use Leto instead of this function.
Back to top
View user's profile Send private message Visit poster's website Yahoo Messenger
acaos



Joined: 08 May 2007
Posts: 153

PostPosted: Mon Aug 04, 2008 0:44    Post subject: Reply with quote

I'll look into this this evening or tomorrow.

Acaos
Back to top
View user's profile Send private message
acaos



Joined: 08 May 2007
Posts: 153

PostPosted: Mon Aug 11, 2008 23:52    Post subject: Reply with quote

The new nwnx_funcs plugin now has all the functions ported from nwnx_functions, including a fixed version of SetRacialType. I'm going to be testing it tonight on our development server for Higher Ground, and if it pans out I will put out the beta release.

Acaos
Back to top
View user's profile Send private message
Extreme



Joined: 28 Nov 2007
Posts: 135

PostPosted: Tue Aug 12, 2008 14:22    Post subject: Reply with quote

excellent. I will look forward to the release and the future testing I can do
Back to top
View user's profile Send private message
acaos



Joined: 08 May 2007
Posts: 153

PostPosted: Tue Aug 12, 2008 22:35    Post subject: Reply with quote

Just wanted to update that I have completed porting and testing nwnx_functions to nwnx_funcs; the only problematic one left is GetPCPort(); once I have that done I will be able to make a beta release of nwnx_funcs as the replacement for nwnx_functions.

Acaos
Back to top
View user's profile Send private message
Extreme



Joined: 28 Nov 2007
Posts: 135

PostPosted: Wed Aug 13, 2008 6:57    Post subject: Reply with quote

will I have to removed nwnx_functions to do this upgrade? or should i?
Back to top
View user's profile Send private message
acaos



Joined: 08 May 2007
Posts: 153

PostPosted: Wed Aug 13, 2008 7:16    Post subject: Reply with quote

Yes, nwnx_funcs is a complete replacement for nwnx_functions.

Acaos
Back to top
View user's profile Send private message
Extreme



Joined: 28 Nov 2007
Posts: 135

PostPosted: Wed Aug 13, 2008 9:40    Post subject: Reply with quote

understood. I will aim to remove the .so and the script. if there is more needed to be done to uninstall the functions let me know Very Happy
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