Server Help Forum Index Server Help
Community forums for Subgame, ASSS, and bots
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   StatisticsStatistics   RegisterRegister 
 ProfileProfile   Login to check your private messagesLogin to check your private messages   LoginLogin (SSL) 

Server Help | ASSS Wiki (0) | Shanky.com
Misc ASSS Questions
Goto page Previous  1, 2, 3, 4, 5, 6, 7, 8, 9, 10  Next
 
Post new topic   Reply to topic Printable version
 View previous topic  per-arena commands? Post :: Post ASSS Zone crashed after 120 days of be...  View next topic  
Author Message
JoWie
Server Help Squatter


Gender:Gender:Male
Joined: Feb 25 2004
Posts: 215
Offline

PostPosted: Sat Jan 15, 2011 9:15 am    Post subject: Reply to topic Reply with quote

Try emptying the data directory, unless you keep track of anything critical using persist.
Back to top
View users profile Send private message Add User to Ignore List
Cheese
Wow Cheese is so helpful!


Joined: Mar 18 2007
Posts: 1017
Offline

PostPosted: Sat Jan 15, 2011 2:35 pm    Post subject: Reply to topic Reply with quote

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
View users profile Send private message Add User to Ignore List Visit posters website AIM Address
JoWie
Server Help Squatter


Gender:Gender:Male
Joined: Feb 25 2004
Posts: 215
Offline

PostPosted: Sun Jan 16, 2011 5:26 am    Post subject: Reply to topic Reply with quote

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
View users profile Send private message Add User to Ignore List
Cheese
Wow Cheese is so helpful!


Joined: Mar 18 2007
Posts: 1017
Offline

PostPosted: Mon Jan 17, 2011 2:55 am    Post subject: Reply to topic Reply with quote

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
View users profile Send private message Add User to Ignore List Visit posters website AIM Address
Dr Brain
Flip-flopping like a wind surfer


Age:38
Gender:Gender:Male
Joined: Dec 01 2002
Posts: 3502
Location: Hyperspace
Offline

PostPosted: Mon Jan 17, 2011 6:34 am    Post subject: Reply to topic Reply with quote

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
View users profile Send private message Add User to Ignore List AIM Address Yahoo Messenger MSN Messenger
Cheese
Wow Cheese is so helpful!


Joined: Mar 18 2007
Posts: 1017
Offline

PostPosted: Mon Jan 17, 2011 8:33 am    Post subject: Reply to topic Reply with quote

icon_eek.gif

elite
Back to top
View users profile Send private message Add User to Ignore List Visit posters website AIM Address
Samapico
No, these DO NOT look like penises, ok?


Joined: May 08 2003
Posts: 1252
Offline

PostPosted: Mon Jan 17, 2011 10:08 am    Post subject: Reply to topic Reply with quote

Interesting
_________________
(Insert a bunch of dead links here)
Back to top
View users profile Send private message Add User to Ignore List
Arnk Kilo Dylie
Seasoned Helper


Age:36
Gender:Gender:Male
Joined: Jul 14 2006
Posts: 108
Offline

PostPosted: Mon Jan 17, 2011 2:46 pm    Post subject: Reply to topic Reply with quote

LLEnumNC(list, afree); for compile-warning reducing goodness.
Back to top
View users profile Send private message Add User to Ignore List Visit posters website
Cheese
Wow Cheese is so helpful!


Joined: Mar 18 2007
Posts: 1017
Offline

PostPosted: Tue Jan 18, 2011 11:05 pm    Post subject: Reply to topic Reply with quote

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
View users profile Send private message Add User to Ignore List Visit posters website AIM Address
Samapico
No, these DO NOT look like penises, ok?


Joined: May 08 2003
Posts: 1252
Offline

PostPosted: Sun Jan 30, 2011 11:48 am    Post subject: Reply to topic Reply with quote

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
View users profile Send private message Add User to Ignore List
Arnk Kilo Dylie
Seasoned Helper


Age:36
Gender:Gender:Male
Joined: Jul 14 2006
Posts: 108
Offline

PostPosted: Sun Jan 30, 2011 10:46 pm    Post subject: Reply to topic Reply with quote

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
View users profile Send private message Add User to Ignore List Visit posters website
Cheese
Wow Cheese is so helpful!


Joined: Mar 18 2007
Posts: 1017
Offline

PostPosted: Mon Jan 31, 2011 1:11 am    Post subject: Reply to topic Reply with quote

so if it warns u, just cast it and tell it to stfu
Back to top
View users profile Send private message Add User to Ignore List Visit posters website AIM Address
Dr Brain
Flip-flopping like a wind surfer


Age:38
Gender:Gender:Male
Joined: Dec 01 2002
Posts: 3502
Location: Hyperspace
Offline

PostPosted: Mon Jan 31, 2011 6:54 am    Post subject: Reply to topic Reply with quote

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
View users profile Send private message Add User to Ignore List AIM Address Yahoo Messenger MSN Messenger
Cheese
Wow Cheese is so helpful!


Joined: Mar 18 2007
Posts: 1017
Offline

PostPosted: Mon Jan 31, 2011 1:26 pm    Post subject: Reply to topic Reply with quote

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
View users profile Send private message Add User to Ignore List Visit posters website AIM Address
Arnk Kilo Dylie
Seasoned Helper


Age:36
Gender:Gender:Male
Joined: Jul 14 2006
Posts: 108
Offline

PostPosted: Mon Jan 31, 2011 2:08 pm    Post subject: Reply to topic Reply with quote

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
View users profile Send private message Add User to Ignore List Visit posters website
Cheese
Wow Cheese is so helpful!


Joined: Mar 18 2007
Posts: 1017
Offline

PostPosted: Mon Jan 31, 2011 8:27 pm    Post subject: Reply to topic Reply with quote

waste of space is bad
redundant code is bad too
why not just cast it
Back to top
View users profile Send private message Add User to Ignore List Visit posters website AIM Address
Arnk Kilo Dylie
Seasoned Helper


Age:36
Gender:Gender:Male
Joined: Jul 14 2006
Posts: 108
Offline

PostPosted: Mon Jan 31, 2011 9:17 pm    Post subject: Reply to topic Reply with quote

It's like you're reading
my posts but you're not reading
the contents of them
Back to top
View users profile Send private message Add User to Ignore List Visit posters website
Dr Brain
Flip-flopping like a wind surfer


Age:38
Gender:Gender:Male
Joined: Dec 01 2002
Posts: 3502
Location: Hyperspace
Offline

PostPosted: Tue Feb 01, 2011 8:07 am    Post subject: Reply to topic Reply with quote

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
View users profile Send private message Add User to Ignore List AIM Address Yahoo Messenger MSN Messenger
Samapico
No, these DO NOT look like penises, ok?


Joined: May 08 2003
Posts: 1252
Offline

PostPosted: Tue Feb 01, 2011 9:08 am    Post subject: Reply to topic Reply with quote

Buuuuuuuuuuurn
Back to top
View users profile Send private message Add User to Ignore List
Cheese
Wow Cheese is so helpful!


Joined: Mar 18 2007
Posts: 1017
Offline

PostPosted: Tue Feb 01, 2011 10:22 am    Post subject: Reply to topic Reply with quote

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
View users profile Send private message Add User to Ignore List Visit posters website AIM Address
Dr Brain
Flip-flopping like a wind surfer


Age:38
Gender:Gender:Male
Joined: Dec 01 2002
Posts: 3502
Location: Hyperspace
Offline

PostPosted: Tue Feb 01, 2011 11:45 am    Post subject: Reply to topic Reply with quote

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
View users profile Send private message Add User to Ignore List AIM Address Yahoo Messenger MSN Messenger
Arnk Kilo Dylie
Seasoned Helper


Age:36
Gender:Gender:Male
Joined: Jul 14 2006
Posts: 108
Offline

PostPosted: Tue Feb 01, 2011 2:30 pm    Post subject: Reply to topic Reply with quote

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
View users profile Send private message Add User to Ignore List Visit posters website
Cheese
Wow Cheese is so helpful!


Joined: Mar 18 2007
Posts: 1017
Offline

PostPosted: Tue Feb 01, 2011 7:07 pm    Post subject: Reply to topic Reply with quote

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
View users profile Send private message Add User to Ignore List Visit posters website AIM Address
Dr Brain
Flip-flopping like a wind surfer


Age:38
Gender:Gender:Male
Joined: Dec 01 2002
Posts: 3502
Location: Hyperspace
Offline

PostPosted: Tue Feb 01, 2011 7:56 pm    Post subject: Reply to topic Reply with quote

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
View users profile Send private message Add User to Ignore List AIM Address Yahoo Messenger MSN Messenger
Cheese
Wow Cheese is so helpful!


Joined: Mar 18 2007
Posts: 1017
Offline

PostPosted: Tue Feb 01, 2011 8:27 pm    Post subject: Reply to topic Reply with quote

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
View users profile Send private message Add User to Ignore List Visit posters website AIM Address
Display posts from previous:   
Post new topic   Reply to topic    Server Help Forum Index -> ASSS Questions All times are GMT - 5 Hours
Goto page Previous  1, 2, 3, 4, 5, 6, 7, 8, 9, 10  Next
Page 7 of 10

 
Jump to:  
You can post new topics in this forum
You can 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
You can attach files in this forum
You can download files in this forum
View online users | View Statistics | View Ignored List


Software by php BB © php BB Group
Server Load: 650 page(s) served in previous 5 minutes.

phpBB Created this page in 0.449598 seconds : 50 queries executed (89.2%): GZIP compression disabled