[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 112: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 112: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 112: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 4787: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3922)
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 4789: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3922)
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 4790: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3922)
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 4791: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3922)
InsideQC Forums • View topic - problems with a very simple function :)

problems with a very simple function :)

Discuss CSQC related programming.

Moderator: InsideQC Admins

problems with a very simple function :)

Postby Nahuel » Fri Jan 26, 2018 11:12 pm

hi, I am nahuel, I love quake and qc.
User avatar
Nahuel
 
Posts: 495
Joined: Wed Jan 12, 2011 8:42 pm
Location: mar del plata

Re: problems with a very simple function :)

Postby Spike » Sat Jan 27, 2018 6:24 am

firstly:
(note that this isn't your immediate problem, but will be important later)
you're not using SendFlags properly. The field provides a set of flags that the engine uses to track what parts of the entity need to be resent.
If you want to resend everything, then you can just set it to -1 (integer maths trick which is the set of all bits). Usually you'll just |= into it though. any adds or subtracts or multiplies or divides or even bit-clears should be considered a bug. copying the value from another entity is also a wtf.
the engine will periodically clear the field back to 0 - so anything that cares about the actual value is thus bugged (the bits get stored into a per-client state tracker, and are passed back to your SendEntity function so that you know its safe to send smaller updates - the first call will have all bits set or so).

secondly:
'Illegible server message' means something got sent that the client didn't understand for one reason or another - the reads in the client didn't match the writes in the server.
FTE has an sv_csqcdebug cvar - this will cause FTE to prefix entity updates and cgame packets with a size value. If the reads do not match the writes then the client will rewind/skip back to the correct place and print a warning whenever it does so. This can be used to tell you where in your code those reads don't match the writes.
So set that cvar to let FTE detect what went wrong.
However it looks like you're debugging in DP, so you're screwed as there's no DP equivalent. My advice to you is to debug it in FTE instead (if only briefly).
.
Spike
 
Posts: 2914
Joined: Fri Nov 05, 2004 3:12 am
Location: UK

Re: problems with a very simple function :)

Postby Nahuel » Sat Jan 27, 2018 1:12 pm

hi, I am nahuel, I love quake and qc.
User avatar
Nahuel
 
Posts: 495
Joined: Wed Jan 12, 2011 8:42 pm
Location: mar del plata

Re: problems with a very simple function :)

Postby Spike » Sat Jan 27, 2018 3:59 pm

.
Spike
 
Posts: 2914
Joined: Fri Nov 05, 2004 3:12 am
Location: UK

Re: problems with a very simple function :)

Postby Nahuel » Sat Jan 27, 2018 9:06 pm

Thank you spike, i managed to make it work by following your advice. But I have a problem, I want to send a custom float that is also variable (as origin) it is. In this case it is the health of the enemy (which is the owner of "indicator").
i have updated the sendflags from ssqc with the + = 1 as I have "understand" your suggestions,
so in this new case i am using: origin + health, so what which sendflags should I use in this case? It is not clear that sendflags should i use for custom floats

Thank you :)
hi, I am nahuel, I love quake and qc.
User avatar
Nahuel
 
Posts: 495
Joined: Wed Jan 12, 2011 8:42 pm
Location: mar del plata

Re: problems with a very simple function :)

Postby Spike » Sun Jan 28, 2018 2:05 am

dude, use |= for SendFlags, NOT +=.
If you're ignoring the flags argument in your SendEntity function, then you might use =1; or possibly =-1; instead of |=1; but still not +=1; insisting on using += is just a wtf that shows that you didn't understand anything of what I wrote.

in case it wasn't clear, the engine doesn't have a clue what data is actually associated with any specific flag. It doesn't care at all. That's for you to decide. They are ALL 'custom'.
.
Spike
 
Posts: 2914
Joined: Fri Nov 05, 2004 3:12 am
Location: UK


Return to CSQC Programming

Who is online

Users browsing this forum: No registered users and 1 guest