Welcome to the Builder Academy

Question Dex Stat crashing mud.

More
10 Jul 2016 05:17 - 10 Jul 2016 05:18 #6100 by Liko
Dex Stat crashing mud. was created by Liko
Hello,
So I decided to change the stat dex to an int. I increased that it can be set to 20,000. Well if you set dex over 18,000 it will disconnect the player. I can't find why.

Note: seems like dex is the only one that is crashing it. All others work fine.

Any ideas?

Randian(0.0.0)
Owner/Developer
Last edit: 10 Jul 2016 05:18 by Liko.

Please Log in or Create an account to join the conversation.

More
10 Jul 2016 17:08 #6101 by thomas
Replied by thomas on topic Dex Stat crashing mud.
have you adjusted the places the stat is used?
github.com/tbamud/tbamud/search?p=2&q=GET_DEX&utf8=%E2%9C%93

Please Log in or Create an account to join the conversation.

More
10 Jul 2016 17:34 - 10 Jul 2016 17:34 #6102 by Liko
Replied by Liko on topic Dex Stat crashing mud.
Yes sir. It's crashing as soon as I copyover. Wis, str, and all that work fine. Don't know why Dex is crashing it. Try to recreate it and see if it happens to you. Copyover goes thru then crash.

Randian(0.0.0)
Owner/Developer
Last edit: 10 Jul 2016 17:34 by Liko.

Please Log in or Create an account to join the conversation.

More
10 Jul 2016 19:57 #6103 by thomas
Replied by thomas on topic Dex Stat crashing mud.
I'm not sure I made myself clear.

All of these places, GET_DEX(ch) is used to lookup in an array:
github.com/tbamud/tbamud/blob/2f12752373.../act.movement.c#L595
github.com/tbamud/tbamud/blob/2f12752373...src/act.other.c#L117
github.com/tbamud/tbamud/blob/2f12752373...f8a4/src/fight.c#L92

We are in C here, so array[100000] is a valid statement, regardless of whether the array only has one element. This can cause all sorts of problems.

Unless you have fixed it, STRENGTH_APPLY_INDEX gives you the same problem.
The following user(s) said Thank You: Liko

Please Log in or Create an account to join the conversation.

More
10 Jul 2016 20:06 #6104 by Liko
Replied by Liko on topic Dex Stat crashing mud.

thomas wrote: I'm not sure I made myself clear.

All of these places, GET_DEX(ch) is used to lookup in an array:
github.com/tbamud/tbamud/blob/2f12752373.../act.movement.c#L595
github.com/tbamud/tbamud/blob/2f12752373...src/act.other.c#L117
github.com/tbamud/tbamud/blob/2f12752373...f8a4/src/fight.c#L92

We are in C here, so array[100000] is a valid statement, regardless of whether the array only has one element. This can cause all sorts of problems.

Unless you have fixed it, STRENGTH_APPLY_INDEX gives you the same problem.


Ah. Seemed I missed one. Silly me.

Randian(0.0.0)
Owner/Developer

Please Log in or Create an account to join the conversation.

More
10 Jul 2016 20:30 #6105 by thomas
Replied by thomas on topic Dex Stat crashing mud.
grep is your friend :)

Please Log in or Create an account to join the conversation.

Time to create page: 0.186 seconds