HTTP Response question
#2

Quote:
Originally Posted by Koreadars
View Post
Is it possible not to use the data parameter as string, but only as integer? (a_http)
Code:
forward HTTPR(index, response_code, data);
instead of
Code:
forward HTTPR(index, response_code, data[]);
I can't test it now, so I'm asking.
Yes just use "strval()" this will convert a string into an integer like this:

Code:
forward HTTPR(index, response_code, data[]);
public HTTPR(index, response_code, data[]) {
	prtinf("Response is now an int: %d", strval(data));
}
Wiki: https://sampwiki.blast.hk/wiki/Strval
Reply


Messages In This Thread
HTTP Response question - by Koreadars - 23.03.2019, 16:38
Re: HTTP Response question - by Shaneisace - 23.03.2019, 16:49
Re: HTTP Response question - by Koreadars - 23.03.2019, 16:50

Forum Jump:


Users browsing this thread: 1 Guest(s)