View previous topic :: View next topic |
Author |
Message |
Extreme
Joined: 28 Nov 2007 Posts: 135
|
Posted: Sat Aug 02, 2008 22:16 Post subject: Using this script, crashes game |
|
|
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 |
|
|
addicted2rpg
Joined: 01 Aug 2008 Posts: 106
|
Posted: Sun Aug 03, 2008 1:33 Post subject: |
|
|
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 |
|
|
virusman
Joined: 30 Jan 2005 Posts: 1020 Location: Russia
|
Posted: Sun Aug 03, 2008 3:25 Post subject: |
|
|
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. |
|
Back to top |
|
|
Extreme
Joined: 28 Nov 2007 Posts: 135
|
Posted: Sun Aug 03, 2008 7:19 Post subject: |
|
|
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 |
|
|
virusman
Joined: 30 Jan 2005 Posts: 1020 Location: Russia
|
Posted: Sun Aug 03, 2008 8:39 Post subject: |
|
|
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 |
|
|
acaos
Joined: 08 May 2007 Posts: 153
|
Posted: Mon Aug 04, 2008 0:44 Post subject: |
|
|
I'll look into this this evening or tomorrow.
Acaos |
|
Back to top |
|
|
acaos
Joined: 08 May 2007 Posts: 153
|
Posted: Mon Aug 11, 2008 23:52 Post subject: |
|
|
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 |
|
|
Extreme
Joined: 28 Nov 2007 Posts: 135
|
Posted: Tue Aug 12, 2008 14:22 Post subject: |
|
|
excellent. I will look forward to the release and the future testing I can do |
|
Back to top |
|
|
acaos
Joined: 08 May 2007 Posts: 153
|
Posted: Tue Aug 12, 2008 22:35 Post subject: |
|
|
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 |
|
|
Extreme
Joined: 28 Nov 2007 Posts: 135
|
Posted: Wed Aug 13, 2008 6:57 Post subject: |
|
|
will I have to removed nwnx_functions to do this upgrade? or should i? |
|
Back to top |
|
|
acaos
Joined: 08 May 2007 Posts: 153
|
Posted: Wed Aug 13, 2008 7:16 Post subject: |
|
|
Yes, nwnx_funcs is a complete replacement for nwnx_functions.
Acaos |
|
Back to top |
|
|
Extreme
Joined: 28 Nov 2007 Posts: 135
|
Posted: Wed Aug 13, 2008 9:40 Post subject: |
|
|
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 |
|
Back to top |
|
|
|