[ socket_recv + json/data ]
See my code:
PHP Code:
How do I interpret this dictionary? I need the dictionary is in json. Or have another best method? |
Re: [ socket_recv + json/data ]
There is NO json parser at AmxmodX as I know.
Use signatures, CSV or any other simple format. Or write your own JSON parser. P.S. do it at client_putinserver(id) otherwise you will have DoS on your web server or MYSQL in case of many connections / fake player flood etc. P.S.2 server= ?? MAybe &ip= ??? |
Re: [ socket_recv + json/data ]
There is a JSON parser written in pure Pawn by Exolent (search), and another one written as a module by Exeorb: https://forums.alliedmods.net/showthread.php?t=244605
|
Re: [ socket_recv + json/data ]
Can you show us an example of the returned data?
|
Re: [ socket_recv + json/data ]
Quote:
PHP Code:
|
Re: [ socket_recv + json/data ]
If you don't want to write your own parser, then try using https://forums.alliedmods.net/showthread.php?t=189772
|
Re: [ socket_recv + json/data ]
Quote:
|
Re: [ socket_recv + json/data ]
Quote:
|
Re: [ socket_recv + json/data ]
PHP Code:
"max_hp" "110" "max_armor" "120" "value" "data" ... I need error: Error: Argument type mismatch (argument 2) on line 45 Line 45: PHP Code:
|
Re: [ socket_recv + json/data ]
Line_value should be an integer, not an array/string
|
All times are GMT -4. The time now is 10:51. |
Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.