New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Crash on OnHTTPResponse #164
Comments
It might be because you defined void SAMPGDK_CALL OnHTTPResponse(int index, int response_code, char data[]) with: PLUGIN_EXPORT void PLUGIN_CALL OnHTTPResponse(int index, int response_code, char data[]) |
If I try to replace it, it shows me this error. |
The definition of your You need to add |
Since you're in C++ you could also use one of numerous HTTP libraries instead. Libcurl is a popular one, but there seems to be a lot more of them: https://curl.haxx.se/libcurl/competitors.html Same goes for MySQL and other stuff that's used outside of SA-MP - there are libraries for that too. |
This seems like a useful list: https://github.com/fffaraz/awesome-cpp |
Could you point me at what exactly is need to be made to |
My decision for PAWN-like syntax is for simplicity,familiarity and easy of use (cause I'm not so good with C+). |
You can't have a custom callback with Here's an example of HTTP usage: https://github.com/Zeex/sampgdk/blob/http-example/plugins/helloworld/helloworld.cpp |
Even copying everything from HTTP example, nothing is been called. |
Did you add OnHTTPResponse to your .def file? https://github.com/Zeex/sampgdk/blob/http-example/plugins/helloworld/helloworld.def |
Everything work now as it should be. Thank you much for those 23 days of help :) |
Just like the title said when OnHTTPResponse is called it crash the server with the following code. Hello world code was used -> http://pastebin.com/WHc79d4y
Exception At Address: 0x0F094ABC Module: (helloworld.DLL)
Registers:
EAX: 0x00000001 EBX: 0x0019E904 ECX: 0x8C942EDF EDX: 0x00000004
ESI: 0x0F064075 EDI: 0x0F09760C EBP: 0x0019F730 ESP: 0x0019E8E8
EFLAGS: 0x00000246
Stack:
+0000: 0x00000000 0x00000000 0x00000009 0x0019F754
+0010: 0x0000001E 0x00000000 0x00000002 0x00740053
+0020: 0x00630061 0x0020006B 0x00720061 0x0075006F
+0030: 0x0064006E 0x00740020 0x00650068 0x00760020
+0040: 0x00720061 0x00610069 0x006C0062 0x00200065
+0050: 0x00730027 0x006F0068 0x00640077 0x00740061
+0060: 0x00270061 0x00770020 0x00730061 0x00630020
+0070: 0x0072006F 0x00750072 0x00740070 0x00640065
+0080: 0x0000002E 0x004A5A3B 0x17214023 0x0019E9CC
+0090: 0x004A05EB 0x000001A8 0x005164C0 0x0000006C
+00A0: 0x00000003 0x0019E9CC 0x004A5A71 0x00AF06B8
+00B0: 0x004A06B9 0x00000003 0x004A06D6 0x00000000
+00C0: 0x004E59F8 0x00000003 0x0000FE87 0x0019E9A4
+00D0: 0x00000003 0x0019ECA8 0x0049D208 0x004BA858
+00E0: 0xFFFFFFFF 0x004A06D6 0x0049EBCD 0x00000003
+00F0: 0x00000000 0x00000001 0x0019E8B8 0x00000001
+0100: 0x0019ECE4 0x0019F02C 0x004AA54B 0xFFFFFFFF
+0110: 0x0100007F 0x0045A4E3 0x004B9D28 0x0019EB21
+0120: 0x00000200 0x00000001 0x00000008 0x00000003
+0130: 0x0100007F 0x0045EA99 0x00000200
The text was updated successfully, but these errors were encountered: