Scripting Help (Simple) -
zero4000 - 24.11.2012
I have a question on the return part of scripts. Here is my question.
What does the return 1 or return 0 do? AND how does it effect the FS after it?
Please make it as
detailed as possible as my FS return values are effecting other FS and them working in game. Im sure if I have a more in depth understanding of what they are and what they do I will be able to solve my problem. Anyone who helps will be given Rep. Thanks.
Re: Scripting Help (Simple) -
Azazelo - 24.11.2012
Returning 0 in OnDialogRespond callback will pass the dialog to another script in case no matching code were found in your gamemode's callback.
Re: Scripting Help (Simple) -
zero4000 - 24.11.2012
This doesnt help me. Please Post
DETAILED descriptions of what returning values do. Not just what returning a value of 0 does for OnDialogResponse. Thanks for trying.
AW: Scripting Help (Simple) -
Blackazur - 24.11.2012
Return 1 if the command was successfully sent. Returning 0, the message is: - to appear in the chat "SERVER Unknown Command.".
Return 0 if you do not want to convey message (for example a mutescript).
Re: Scripting Help (Simple) -
zero4000 - 24.11.2012
If that is true then the returning values would not effect how the next FS in the config file loads. AND IT DOES. So this is not right. I am having troubles with my FS working in game. I mess with the returning values and I get some of the FS to work but not all of it. By what im gathering from everyone the return value does something different for each callback?!?!
Re: Scripting Help (Simple) -
Azazelo - 25.11.2012
When using these callbacks in a filterscript, make sure you return 1, so it's available in other filterscripts too. When you don't return a value or return 0, other callbacks in filterscripts loaded at a later time aren't executed.
Returning a value doesn't matter in OnFilterScriptInit and OnFilterScriptExit.
Re: Scripting Help (Simple) -
Glad2BeHere - 25.11.2012
The return value just stats how u want to execute something after said function is done
return 1 = True
return 0 = false
or u can give it a value like
return Kick(playerid);
return SendClientMessage(id,col,"mg");