Author |
Message |
Guest
Offline
|
|
Back to top |
|
 |
Animate Dreams Gotta buy them all! (Consumer whore)

Age:37 Gender: Joined: May 01 2004 Posts: 821 Location: Middle Tennessee Offline
|
Posted: Mon Jul 02, 2007 3:29 pm Post subject: |
 |
|
|
|
I think it's perfectly fine to do it inside of PlayerAction, and both PA_ENTERGAME and PA_ENTERARENA. The only thing I can think of... you sure blah is a valid variable inside playerData? Also, I'd double-check your caps, to make sure they're all the same. It'd be nice to see your declaration of the playerData struct, too.
|
|
Back to top |
|
 |
JoWie Server Help Squatter
Gender: Joined: Feb 25 2004 Posts: 215 Offline
|
Posted: Mon Jul 02, 2007 4:16 pm Post subject: |
 |
|
|
|
here is the entire source
pershiplvz.c - 4.33 KB
File downloaded or viewed 27 time(s)
|
|
Back to top |
|
 |
Animate Dreams Gotta buy them all! (Consumer whore)

Age:37 Gender: Joined: May 01 2004 Posts: 821 Location: Middle Tennessee Offline
|
Posted: Mon Jul 02, 2007 4:40 pm Post subject: |
 |
|
|
|
Well, since all you're doing is freeing your playerdata if it fails to load(line 75 for example), you really have no way of knowing if it ever loaded successfully. Also, why do you initialize your playerKey to be -1? I don't think you have to do that. Though, I'm pretty sure it gets written over, so that shouldn't be the problem. Anyway, you could rewrite the part, under MM_LOAD, to send an error message to the console when it wasn't allocating data properly, that way you'd know if the error was in allocation.
I also don't understand the oldship = -1. I didn't know that was valid, either. It might be, though. I'm no expert. I suppose you could try messing with it anyway. I'd try it myself, but I'm at work, and I forgot my IP so I can't ssh to my computer at home.
|
|
Back to top |
|
 |
JoWie Server Help Squatter
Gender: Joined: Feb 25 2004 Posts: 215 Offline
|
Posted: Mon Jul 02, 2007 4:53 pm Post subject: |
 |
|
|
|
If the player data fails to load, MM_FAIL is returned which means the module fails to load (and you get a message on your console IIRC). MM_ATTACH is then never called, this means the PlayerAction callback never gets registered.
Ship 0 is warbird
I set oldShip to -1 so the LVZ gets shown if your first ship is a warbird.
The reason why I use oldShip is to turn of the old LVZ object
|
|
Back to top |
|
 |
tcsoccerman Server Help Squatter
Age:33 Gender: Joined: Jan 15 2007 Posts: 694 Location: Atlantis Offline
|
|
Back to top |
|
 |
Animate Dreams Gotta buy them all! (Consumer whore)

Age:37 Gender: Joined: May 01 2004 Posts: 821 Location: Middle Tennessee Offline
|
Posted: Tue Jul 03, 2007 4:59 pm Post subject: |
 |
|
|
|
Um, action is an int passed in by the function, PlayerAction, as you can see on line 1.
|
|
Back to top |
|
 |
tcsoccerman Server Help Squatter
Age:33 Gender: Joined: Jan 15 2007 Posts: 694 Location: Atlantis Offline
|
Posted: Tue Jul 03, 2007 5:02 pm Post subject: |
 |
|
|
|
which means look in players.h or something to see what that is equal to in #'s.
|
|
Back to top |
|
 |
Cyan~Fire I'll count you!

Age:37 Gender: Joined: Jul 14 2003 Posts: 4608 Location: A Dream Offline
|
Posted: Tue Jul 03, 2007 5:27 pm Post subject: |
 |
|
|
|
What? Animate is right, that's definitely not going to fix anything. (It will break things, instead.) _________________ This help is informational only. No representation is made or warranty given as to its content. User assumes all risk of use. Cyan~Fire assumes no responsibility for any loss or delay resulting from such use.
Wise men STILL seek Him.
|
|
Back to top |
|
 |
tcsoccerman Server Help Squatter
Age:33 Gender: Joined: Jan 15 2007 Posts: 694 Location: Atlantis Offline
|
Posted: Tue Jul 03, 2007 5:39 pm Post subject: |
 |
|
|
|
nvm. i thought it would be similiar to mapdata, for example NO_TILE = 0, TILE_END = 1. and so on. i guess they're not the same.
|
|
Back to top |
|
 |
Animate Dreams Gotta buy them all! (Consumer whore)

Age:37 Gender: Joined: May 01 2004 Posts: 821 Location: Middle Tennessee Offline
|
Posted: Tue Jul 03, 2007 5:59 pm Post subject: |
 |
|
|
|
My point is, action isn't a variable in the Player struct. It is passed in, right there, in that function, on line 1. So simply checking "action" is correct. Even if there was a variable named action in the player struct, I'm pretty sure you'd still be expected to use the action passed in by the function. After all, that's why it's passed in.
|
|
Back to top |
|
 |
JoWie Server Help Squatter
Gender: Joined: Feb 25 2004 Posts: 215 Offline
|
Posted: Tue Jul 03, 2007 6:28 pm Post subject: |
 |
|
|
|
Getting back to the original problem, any idea why it crashes when requesting per player data in PA_ENTERGAME?
|
|
Back to top |
|
 |
Smong Server Help Squatter

Joined: 1043048991 Posts: 0x91E Offline
|
Posted: Wed Jul 04, 2007 11:41 am Post subject: |
 |
|
|
|
I looked at it and couldn't get it to crash under linux. Under windows I can't tell if it's this module or another one causing it (I have so much custom stuff loaded). Maybe it's conflicting with another module? Although I would have thought pdkey would equal -1 if asss couldn't allocate space for it. _________________ ss news
|
|
Back to top |
|
 |
JoWie Server Help Squatter
Gender: Joined: Feb 25 2004 Posts: 215 Offline
|
|
Back to top |
|
 |
|