Raised This Month: $32 Target: $400
 8% 

Solved [L4D2] my global value is never changed


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
desire worker
Junior Member
Join Date: Dec 2018
Location: Umbrella Corporation
Old 12-15-2018 , 01:17   [L4D2] my global value is never changed
Reply With Quote #1

I defined global value which name is CurrentV[Maxplayer+1];

and modified its value in some functions in code.

but my code didn`t work well, so I tracked CurretV[c] value.

and it only display specific value(don`t know exact but was about 90000) and was never changed from start to end.

why this thing happens?
Attached Files
File Type: sp Get Plugin or Get Source (sayonara_chainsaw.sp - 85 views - 8.4 KB)

Last edited by desire worker; 12-15-2018 at 12:00.
desire worker is offline
Bacardi
Veteran Member
Join Date: Jan 2010
Location: mom's basement
Old 12-15-2018 , 01:29   Re: [L4D2] my global value is never changed
Reply With Quote #2

...you not use Handles when creating ConVar.
You should look others dev's plugin source code.

*edit
since you started learning old SourcePawn syntax style, which isn't good if others move in new style.
here history https://wiki.alliedmods.net/index.ph...ng)&oldid=6865
__________________
Do not Private Message @me

Last edited by Bacardi; 12-15-2018 at 01:33.
Bacardi is offline
Dragokas
Veteran Member
Join Date: Nov 2017
Location: Ukraine on fire
Old 12-15-2018 , 09:30   Re: [L4D2] my global value is never changed
Reply With Quote #3

It's not only the matter of convenience, plugin written in new syntax has a difference (more safe) in initial array initialization (it's zeroed).
Concretely, your code has no such problem because array declared with "int", not "decl".
Also, new syntax together with using methodmaps is working faster.
Also, there are free converters in this forum.

Quote:
and it only display specific value(don`t know exact but was about 90000) and was never changed from start to end.
What that mean "you don't know exactly" ? Create function to log to file (or use LogToFile()) and log everything (together with events and your basic functions EP) to see what is really going on.

Your question is too vague to tip something.
__________________
Expert of CMD/VBS/VB6. Malware analyst. L4D fun (Bloody Witch & FreeZone)
[My plugins] [My tools] [GitHub] [Articles] [HiJackThis+] [Donate]
Dragokas is offline
desire worker
Junior Member
Join Date: Dec 2018
Location: Umbrella Corporation
Old 12-15-2018 , 12:01   Re: [L4D2] my global value is never changed
Reply With Quote #4

exact value was 102498 which was declared on above. but never mind, this old version is not valid.

the project has been end

Last edited by desire worker; 12-15-2018 at 12:22.
desire worker is offline
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 13:21.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode