Author |
Message |
Samapico No, these DO NOT look like penises, ok?
Joined: May 08 2003 Posts: 1252 Offline
|
Posted: Wed Apr 21, 2010 1:39 pm Post subject: |
|
|
|
|
Cheese wrote: | what is the possible range for *objon?
i would guess its a power of 2, and i know its over 256...
and what is the point of failure?
does the lvz builder break first or the objon cmd?
PS:
also, it looks like theres a 256 object max?
edit:
found it.
[..]
so its (2^16)/2
thats like a signed short int, right? |
The objectID is an unsigned 15 bit integer.
The way it's packed in the lvz file, the first bit indicates a mapobject or screenobject, and the following 15 bits are the objectID. Then you have other data such as x/y coordinates, layer, etc.
http://wiki.minegoboom.com/index.php/LVZ_Format
Note that Continuum has a limit of 255 (or maybe 256?) DIFFERENT images (see Image Number) _________________ (Insert a bunch of dead links here) |
|
Back to top |
|
|
JoWie Server Help Squatter
Gender: Joined: Feb 25 2004 Posts: 215 Offline
|
Posted: Wed Apr 21, 2010 5:17 pm Post subject: |
|
|
|
|
I thought it was 255 max images per lvz file and 256 max total |
|
Back to top |
|
|
Samapico No, these DO NOT look like penises, ok?
Joined: May 08 2003 Posts: 1252 Offline
|
Posted: Wed Apr 21, 2010 5:23 pm Post subject: |
|
|
|
|
JoWie wrote: | I thought it was 255 max images per lvz file and 256 max total | Could be so... though I don't see why a single lvz could not have 256 images, unless the Continuum's implementation is kind of screwed up. |
|
Back to top |
|
|
Cheese Wow Cheese is so helpful!
Joined: Mar 18 2007 Posts: 1017 Offline
|
Posted: Fri Apr 23, 2010 10:09 pm Post subject: |
|
|
|
|
how do i set up a callback?
ive tried:
in x.c
DO_CBS(CB_X,a,xFunc,(a,p,freq));
|
in x.h
#define CB_X "x"
typedef void (*xFunc)(Arena *a, Player *p, int freq);
|
but i have yet to get a single callback to work without crashing the zone.
what am i missing?
edit:
also, why on earth is DO_CBS defined as a
do
{
} while(0)
macro?
isnt that completely pointless? _________________ SSC Distension Owner
SSCU Trench Wars Developer |
|
Back to top |
|
|
Arnk Kilo Dylie Seasoned Helper
Age:36 Gender: Joined: Jul 14 2006 Posts: 108 Offline
|
Posted: Sat Apr 24, 2010 12:08 am Post subject: |
|
|
|
|
No, adding a new {} block allows you to define new variable names under non-C99 compilers. |
|
Back to top |
|
|
Cheese Wow Cheese is so helpful!
Joined: Mar 18 2007 Posts: 1017 Offline
|
Posted: Sat Apr 24, 2010 1:01 am Post subject: |
|
|
|
|
but u can just use a normal { } to do that, why the do while |
|
Back to top |
|
|
Arnk Kilo Dylie Seasoned Helper
Age:36 Gender: Joined: Jul 14 2006 Posts: 108 Offline
|
Posted: Sat Apr 24, 2010 2:47 am Post subject: |
|
|
|
|
Might be for added compatibility. I don't know any compiler that requires it as such.
If you're getting a crash a backtrace might be in order if DO_CBS is failing. Which is to say, you're probably doing something else wrong, but knowing where the crash is happening will give some vital information. |
|
Back to top |
|
|
Cheese Wow Cheese is so helpful!
Joined: Mar 18 2007 Posts: 1017 Offline
|
Posted: Sat Apr 24, 2010 1:53 pm Post subject: |
|
|
|
|
how do i do a backtrace if im not on linux? |
|
Back to top |
|
|
Dr Brain Flip-flopping like a wind surfer
Age:38 Gender: Joined: Dec 01 2002 Posts: 3502 Location: Hyperspace Offline
|
Posted: Sat Apr 24, 2010 5:04 pm Post subject: |
|
|
|
|
Same way as on linux: use a debugger. _________________ 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: Sat Apr 24, 2010 5:47 pm Post subject: |
|
|
|
|
found out using the MyBrain debugger:
logic: zone crashes largely due to null pointer usage, where in do_cbs does it use a pointer?
i now know why dr brain has the curious habit of putting
mm=mm2;
at the beginning of every load.
just like any other interface, if you call it without loading it, it crashes the zone.
you still cant use a null pointer... |
|
Back to top |
|
|
JoWie Server Help Squatter
Gender: Joined: Feb 25 2004 Posts: 215 Offline
|
|
Back to top |
|
|
Cheese Wow Cheese is so helpful!
Joined: Mar 18 2007 Posts: 1017 Offline
|
|
Back to top |
|
|
Hakaku Server Help Squatter
Joined: Apr 07 2006 Posts: 299 Location: Canada Offline
|
Posted: Tue Apr 27, 2010 6:38 pm Post subject: |
|
|
|
|
What exactly are you trying to achieve? And why don't you just use player data? |
|
Back to top |
|
|
Cheese Wow Cheese is so helpful!
Joined: Mar 18 2007 Posts: 1017 Offline
|
Posted: Tue Apr 27, 2010 6:54 pm Post subject: |
|
|
|
|
because im saving a player pointer? |
|
Back to top |
|
|
Samapico No, these DO NOT look like penises, ok?
Joined: May 08 2003 Posts: 1252 Offline
|
Posted: Tue Apr 27, 2010 7:20 pm Post subject: |
|
|
|
|
I'm taking a wild guess here, and I haven't worked with ASSS at all... But chances are the pointers you use are not safe to use because the data might be moved around, or even deleted when the player list changes.
The safest way would be to store some unique info (name or some ID) instead of a pointer, and find that info in the list everytime you want to take an action on a player. |
|
Back to top |
|
|
Cheese Wow Cheese is so helpful!
Joined: Mar 18 2007 Posts: 1017 Offline
|
|
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 Apr 27, 2010 10:10 pm Post subject: |
|
|
|
|
Which line does the debugger say it's crashing on? |
|
Back to top |
|
|
Cheese Wow Cheese is so helpful!
Joined: Mar 18 2007 Posts: 1017 Offline
|
Posted: Thu Apr 29, 2010 2:24 am Post subject: |
|
|
|
|
i have set an arena [team] to only allow freqs 0-1, and set it to a 1 person limit (so players cant =1) with the new team settings.
however, for some reason it places a person on freq 0, then 1, then the rest of anyone who joins on freq 0, eventually making it 1000v1.
how can i get it to be 500v500 instead, while still not allowing =1? |
|
Back to top |
|
|
Cheese Wow Cheese is so helpful!
Joined: Mar 18 2007 Posts: 1017 Offline
|
Posted: Mon May 03, 2010 10:56 pm Post subject: |
|
|
|
|
why does
int totalrp[2];
lm->Log(L_DRIVEL,"0a 0=%i 1=%i",totalrp[0],totalrp[1]);
output
D 0a 0=2293240 1=4207083
what the hell is going on?
its only 2 lines of code, nothing else |
|
Back to top |
|
|
Samapico No, these DO NOT look like penises, ok?
Joined: May 08 2003 Posts: 1252 Offline
|
Posted: Mon May 03, 2010 11:55 pm Post subject: |
|
|
|
|
Cheese wrote: | why does
int totalrp[2];
lm->Log(L_DRIVEL,"0a 0=%i 1=%i",totalrp[0],totalrp[1]);
output
D 0a 0=2293240 1=4207083
what the hell is going on?
its only 2 lines of code, nothing else | Well... because your ints are not initialized? |
|
Back to top |
|
|
Cheese Wow Cheese is so helpful!
Joined: Mar 18 2007 Posts: 1017 Offline
|
Posted: Tue May 04, 2010 11:07 am Post subject: |
|
|
|
|
ints are always auto initialized to 0 |
|
Back to top |
|
|
Arnk Kilo Dylie Seasoned Helper
Age:36 Gender: Joined: Jul 14 2006 Posts: 108 Offline
|
Posted: Tue May 04, 2010 1:40 pm Post subject: |
|
|
|
|
...
.....
no lol |
|
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 May 04, 2010 1:44 pm Post subject: |
|
|
|
|
Variables are not initialized except in certain specific situations (situations such as using a completely different programming language, lol). Memory too, is not guaranteed to be zeroed when allocated (which is why amalloc zeros it out before returning it). |
|
Back to top |
|
|
Cheese Wow Cheese is so helpful!
Joined: Mar 18 2007 Posts: 1017 Offline
|
Posted: Tue May 04, 2010 1:49 pm Post subject: |
|
|
|
|
WTFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
since when omfg
spent like an hour trying to figure out why 1+2+3=1239854
:C |
|
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 May 04, 2010 2:25 pm Post subject: |
|
|
|
|
Since before you were born. |
|
Back to top |
|
|
|