cookies - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: cookies (
/showthread.php?tid=633005)
cookies -
Loinal - 23.04.2017
Fixed was using cookies 2 times
Re: cookies -
khRamin78 - 23.04.2017
da ?
defining as int and using as string ?
PHP код:
new id, bString[128], cookies; // this line should be cookies[] if you need as string
if(IRC_IsOp(botid, channel, user))
{
if(sscanf(params, "ui[24]", id,cookies)) // or if cookies is int just remove that [24]
Re: cookies -
Loinal - 23.04.2017
Quote:
Originally Posted by khRamin78
da ?
defining as int and using as string ?
PHP код:
new id, bString[128], cookies; // this line should be cookies[] if you need as string
if(IRC_IsOp(botid, channel, user))
{
if(sscanf(params, "ui[24]", id,cookies)) // or if cookies is int just remove that [24]
|
Nothing changed
Re: cookies -
Loinal - 23.04.2017
Any help?
Re: cookies -
denNorske - 23.04.2017
How can cookies either be less than 1 and higher than 100 at the same time?
Read the code carefully
Also note what he said above, when you use "i" for numbers, you don't need to define a string length [length] in the sscanf. That is only needed when you use "s" for strings.
PHP код:
if(cookies < 1 && cookies > 100)
Re: cookies -
khRamin78 - 23.04.2017
EDITED:NVM ANSWERD ABOVE
PHP код:
if(cookies < 1 && cookies > 100)
/*this will return nothing ! there is no number more than 100 and less than 1*/
// use this method instead
if(cookies < 1 || cookies > 100)
/*
&& >> and
|| >> or
*/