SA-MP Forums Archive
stock boolean - 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: stock boolean (/showthread.php?tid=638132)



stock boolean - Bussyman - 27.07.2017

Hi,

If i have function

Код:
stock anyfunction()
{
return true;
}

stock anyfunction()
{
return 1;
}
Is there any difference? do i need anyfunction with return true make bool:anyfunction or this is not need?


Re: stock boolean - Bussyman - 27.07.2017

UP TOPIC


Re: stock boolean - Xeon™ - 27.07.2017

Quote:
Originally Posted by Bussyman
Посмотреть сообщение
Hi,

If i have function

Код:
stock anyfunction()
{
return true;
}

stock anyfunction()
{
return 1;
}
Is there any difference? do i need anyfunction with return true make bool:anyfunction or this is not need?
well, with making it bool:anyfunction() it will only return "false" or "true", but without "bool:" the function can return many type of objects/variables


Re: stock boolean - Bussyman - 27.07.2017

Yes, but talking about just return true and return 1 i can use return true in stock function?


Re: stock boolean - Dayrion - 27.07.2017

Return [-infinite, -1] ; [1, +infinite] = true
Return 0 = false
Boolean make the function return true or false, nothing else