Author |
Message |
JoWie Server Help Squatter
Gender: Joined: Feb 25 2004 Posts: 215 Offline
|
Posted: Sat Jan 15, 2011 9:15 am Post subject: |
|
|
|
|
Try emptying the data directory, unless you keep track of anything critical using persist. |
|
Back to top |
|
|
Cheese Wow Cheese is so helpful!
Joined: Mar 18 2007 Posts: 1017 Offline
|
Posted: Sat Jan 15, 2011 2:35 pm Post subject: |
|
|
|
|
that worked, but which file was corrupted?
how did it break?
whats the __db.00* 1-3, and whats the data.db? _________________ SSC Distension Owner
SSCU Trench Wars Developer |
|
Back to top |
|
|
JoWie Server Help Squatter
Gender: Joined: Feb 25 2004 Posts: 215 Offline
|
Posted: Sun Jan 16, 2011 5:26 am Post subject: |
|
|
|
|
Berkeley DB. Database library that is not relational and has no networking. It is, for example, where the player points (billing is never used for points) and ?stats go.
When you play around with asss a lot (and it crashes all the time) they can get corrupted. I've had this a few times and clearing the data directory is the easiest solution. If I recall correctly, hyperspace was down for 1.5 days due to this problem.
BDB has safeguards to prevent this kind of thing, but you need to use transactions to get the full extent of these safeguards. |
|
Back to top |
|
|
Cheese Wow Cheese is so helpful!
Joined: Mar 18 2007 Posts: 1017 Offline
|
Posted: Mon Jan 17, 2011 2:55 am Post subject: |
|
|
|
|
is there a LLEmptyListAndData() that empties a list by deallocating each link and the data it points to?
but doesnt delete the list itself, just everything in it
or do i have to call a for_each ghetto style? |
|
Back to top |
|
|
Dr Brain Flip-flopping like a wind surfer
Age:38 Gender: Joined: Dec 01 2002 Posts: 3502 Location: Hyperspace Offline
|
Posted: Mon Jan 17, 2011 6:34 am Post subject: |
|
|
|
|
LLEnum(&list, afree);
LLEmpty(&list); _________________ Hyperspace Owner
Smong> so long as 99% deaths feel lame it will always be hyperspace to me |
|
Back to top |
|
|
Cheese Wow Cheese is so helpful!
Joined: Mar 18 2007 Posts: 1017 Offline
|
Posted: Mon Jan 17, 2011 8:33 am Post subject: |
|
|
|
|
elite |
|
Back to top |
|
|
Samapico No, these DO NOT look like penises, ok?
Joined: May 08 2003 Posts: 1252 Offline
|
Posted: Mon Jan 17, 2011 10:08 am Post subject: |
|
|
|
|
Interesting _________________ (Insert a bunch of dead links here) |
|
Back to top |
|
|
Arnk Kilo Dylie Seasoned Helper
Age:36 Gender: Joined: Jul 14 2006 Posts: 108 Offline
|
Posted: Mon Jan 17, 2011 2:46 pm Post subject: |
|
|
|
|
LLEnumNC(list, afree); for compile-warning reducing goodness. |
|
Back to top |
|
|
Cheese Wow Cheese is so helpful!
Joined: Mar 18 2007 Posts: 1017 Offline
|
Posted: Tue Jan 18, 2011 11:05 pm Post subject: |
|
|
|
|
how do i set a player's koth crown?
and is it possible to make a crown never expire?
im looking at koth.c, but it seems to only use sendtoone()
how would the rest of the players know they got a crown?
it also used SET_HAS_CROWN(p), where is that defined? |
|
Back to top |
|
|
Samapico No, these DO NOT look like penises, ok?
Joined: May 08 2003 Posts: 1252 Offline
|
Posted: Sun Jan 30, 2011 11:48 am Post subject: |
|
|
|
|
Arnk Kilo Dylie wrote: | LLEnumNC(list, afree); for compile-warning reducing goodness. | It still gives a warning:
passing argument 2 of 'LLEnumNC' from incompatible pointer type |
|
Back to top |
|
|
Arnk Kilo Dylie Seasoned Helper
Age:36 Gender: Joined: Jul 14 2006 Posts: 108 Offline
|
Posted: Sun Jan 30, 2011 10:46 pm Post subject: |
|
|
|
|
True. I was under the mistaken impression that afree accepted void * instead of const void *, considering that freeing the data invalidates it. LLEnumNC would be good for functions that accept void * instead of const void *. So I had it backwards. |
|
Back to top |
|
|
Cheese Wow Cheese is so helpful!
Joined: Mar 18 2007 Posts: 1017 Offline
|
Posted: Mon Jan 31, 2011 1:11 am Post subject: |
|
|
|
|
so if it warns u, just cast it and tell it to stfu |
|
Back to top |
|
|
Dr Brain Flip-flopping like a wind surfer
Age:38 Gender: Joined: Dec 01 2002 Posts: 3502 Location: Hyperspace Offline
|
Posted: Mon Jan 31, 2011 6:54 am Post subject: |
|
|
|
|
Cheese wrote: | so if it warns u, just cast it and tell it to stfu |
No, if it warns you then use LLEnum instead. |
|
Back to top |
|
|
Cheese Wow Cheese is so helpful!
Joined: Mar 18 2007 Posts: 1017 Offline
|
Posted: Mon Jan 31, 2011 1:26 pm Post subject: |
|
|
|
|
it might be compiler specific then, because it throws me warnings for llenumnc(afree) and compiles with 0 warnings with llenum(afree)
but what im wondering is why you would waste space on writing two literally identical functions when you could simply cast the pointer in the extremely rare case you would use a const?
isnt it just a waste of space in the file and a waste of space in the binary?
this has hack written all over it |
|
Back to top |
|
|
Arnk Kilo Dylie Seasoned Helper
Age:36 Gender: Joined: Jul 14 2006 Posts: 108 Offline
|
Posted: Mon Jan 31, 2011 2:08 pm Post subject: |
|
|
|
|
Four posts up I said
That I made an assumption
afree took nonconst
Your understanding
of compilers and constness
may be lacking some
Casting away const
Defeats the purpose of it
I am no expert |
|
Back to top |
|
|
Cheese Wow Cheese is so helpful!
Joined: Mar 18 2007 Posts: 1017 Offline
|
Posted: Mon Jan 31, 2011 8:27 pm Post subject: |
|
|
|
|
waste of space is bad
redundant code is bad too
why not just cast it |
|
Back to top |
|
|
Arnk Kilo Dylie Seasoned Helper
Age:36 Gender: Joined: Jul 14 2006 Posts: 108 Offline
|
Posted: Mon Jan 31, 2011 9:17 pm Post subject: |
|
|
|
|
It's like you're reading
my posts but you're not reading
the contents of them |
|
Back to top |
|
|
Dr Brain Flip-flopping like a wind surfer
Age:38 Gender: Joined: Dec 01 2002 Posts: 3502 Location: Hyperspace Offline
|
Posted: Tue Feb 01, 2011 8:07 am Post subject: |
|
|
|
|
Is the guy who created a 7 page thread really trying to lecture us on a waste of space?
If the space is so important to you, remove all the whitespace and tabs. That'll save far more room. If the code size is important, try optimize for size (-Os). It really does wonders. You could also write your code in assembly.
Casting is never a good idea. If you've got to cast something, you're probably doing crazy stuff (like implementing OO in a non-OO language). Type safety is there for a reason. |
|
Back to top |
|
|
Samapico No, these DO NOT look like penises, ok?
Joined: May 08 2003 Posts: 1252 Offline
|
Posted: Tue Feb 01, 2011 9:08 am Post subject: |
|
|
|
|
Buuuuuuuuuuurn |
|
Back to top |
|
|
Cheese Wow Cheese is so helpful!
Joined: Mar 18 2007 Posts: 1017 Offline
|
Posted: Tue Feb 01, 2011 10:22 am Post subject: |
|
|
|
|
7 page thread instead of 100 1 page threads?
space saved $
writing a second literally identical function simply because you dont 'like' casting is just silly, its like writing a bastardized set of nested loops with 100 variables simply because you think 1 goto is never acceptable
casting is rarely used, but its there for a reason |
|
Back to top |
|
|
Dr Brain Flip-flopping like a wind surfer
Age:38 Gender: Joined: Dec 01 2002 Posts: 3502 Location: Hyperspace Offline
|
Posted: Tue Feb 01, 2011 11:45 am Post subject: |
|
|
|
|
Yes, a 1 page thread would allow forum searching (not everything is about you, you know), and save page space, preventing everyone from reading the last few posts to get caught up on stupid topic #45.
Feel free to cast your non-const functions into const functions, but don't expect the rest of us to do it.
Oh, and there are plenty of good ways to write nested loops without gotos. |
|
Back to top |
|
|
Arnk Kilo Dylie Seasoned Helper
Age:36 Gender: Joined: Jul 14 2006 Posts: 108 Offline
|
Posted: Tue Feb 01, 2011 2:30 pm Post subject: |
|
|
|
|
Dr Brain wrote: |
If you've got to cast something, you're probably doing crazy stuff (like implementing OO in a non-OO language). |
akd_lag for the win!
cheese
this is the third time I've said this now
READ UP ON CONSTNESS.
just because you can cast doesn't mean it's the correct way to do things. const isn't just some annoying tag--it has a purpose and you are defeating that purpose by ignoring it. if it bothers you, just use LLEnumNC all of the time and you won't have to cast anything, you just won't be getting benefit from const.
the difference is
one function is for iterating with functions that don't change the buffer (with the special exception of freeing I guess)
the other one is for things that do change the buffer.
why is this important? read up on constness.
p.s. goto is fine but it should be a last resort. even asss does some out of laziness, but as long as you use it like a pro and not like a newbie you're not doing anything wrong. |
|
Back to top |
|
|
Cheese Wow Cheese is so helpful!
Joined: Mar 18 2007 Posts: 1017 Offline
|
Posted: Tue Feb 01, 2011 7:07 pm Post subject: |
|
|
|
|
so what is this shipinfo.dat?
is it implemented in subgame? what about asss?
the wiki page says its an arena file, but i wouldnt think an arena file would affect the zone list
anyone have more info on this? |
|
Back to top |
|
|
Dr Brain Flip-flopping like a wind surfer
Age:38 Gender: Joined: Dec 01 2002 Posts: 3502 Location: Hyperspace Offline
|
Posted: Tue Feb 01, 2011 7:56 pm Post subject: |
|
|
|
|
It has nothing to do with asss or subgame. Try reading that entry more carefully. It says it can be included in the arena's levelfiles (i.e. alongside lvzs). |
|
Back to top |
|
|
Cheese Wow Cheese is so helpful!
Joined: Mar 18 2007 Posts: 1017 Offline
|
Posted: Tue Feb 01, 2011 8:27 pm Post subject: |
|
|
|
|
so then every user would have to put that file in their directory?
is there another way to get it there?
and i dont see where the ship names (the top part) is used, where might that be used?
is it only for the * thing?
also:
what is the 'target' field in the esc+q>profiles page used for?
(its the one above 'chats') |
|
Back to top |
|
|
|