Raised This Month: $12 Target: $400
 3% 

Solved [L4D2] KeyValues::GetInt crash server


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
sorallll
Senior Member
Join Date: Oct 2018
Old 02-17-2022 , 04:21   [L4D2] KeyValues::GetInt crash server
Reply With Quote #1

Recently when I try to use KeyValues::GetInt to get some data, the server keeps crashing, can anyone help me find out why

Here is the crash analysis, it tells me that I am using the wrong game data
Attached Files
File Type: sp Get Plugin or Get Source (keyvalues_getint.sp - 102 views - 2.4 KB)
File Type: txt keyvalues_getint.txt (1.2 KB, 73 views)

Last edited by sorallll; 02-17-2022 at 21:20.
sorallll is offline
Silvers
SourceMod Plugin Approver
Join Date: Aug 2010
Location: SpaceX
Old 02-17-2022 , 04:42   Re: [L4D2] KeyValues::GetInt crash server
Reply With Quote #2

You could just use GetString() this is what I do for all my stuff. Info Editor for example does this and returns ints/floats etc as strings. Looks like the way you're calling is all wrong. Whats with the extra 0 at the end.
__________________
Silvers is offline
sorallll
Senior Member
Join Date: Oct 2018
Old 02-17-2022 , 04:43   Re: [L4D2] KeyValues::GetInt crash server
Reply With Quote #3

Quote:
Originally Posted by Silvers View Post
You could just use GetString() this is what I do for all my stuff. Info Editor for example does this and returns ints/floats etc as strings. Looks like the way you're calling is all wrong. Whats with the extra 0 at the end.
0 is the default value
sorallll is offline
sorallll
Senior Member
Join Date: Oct 2018
Old 02-17-2022 , 05:00   Re: [L4D2] KeyValues::GetInt crash server
Reply With Quote #4

Now the data can be read normally
Attached Files
File Type: sp Get Plugin or Get Source (keyvalues_getint.sp - 85 views - 2.5 KB)
File Type: txt keyvalues_getint.txt (1.2 KB, 29 views)

Last edited by sorallll; 02-17-2022 at 21:22. Reason: The problem is solved
sorallll 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 10:56.


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