SA-MP Forums

Go Back   SA-MP Forums > SA-MP Scripting and Plugins > Scripting Help > Help Archive

Thread Tools Display Modes
Old 27/02/2010, 01:25 PM   #1
Little Clucker
Join Date: Jul 2008
Posts: 33
Reputation: 0
Default Optional parameters?

Im trying to create a function which looks like:

Function(playerid, optional:amount);

And when amount isn't specified, it will be 0.

I see this in some default functions (Blah(playerid, thing=1)

Gozerr is offline  
Old 27/02/2010, 02:21 PM   #2
Join Date: Jun 2007
Posts: 785
Reputation: 166
Default Re: Optional parameters?

pawn Code:
stock Function(playerid, amount = 0)
woot is offline  

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED \o/]sscanf and multiple optional parameters dcmd_crash Help Archive 29 26/04/2010 12:36 AM
Sm like an optional Parameter Rauminator Help Archive 2 06/02/2010 05:40 PM
Optional Parameters Dreftas Help Archive 1 11/10/2009 11:34 AM
using sscanf for optional integer inputs at the end of a command ( possible?) iLinx Help Archive 1 31/07/2009 08:00 PM

All times are GMT. The time now is 05:27 PM.

Powered by vBulletin® Version 3.8.6
Copyright ©2000 - 2019, Jelsoft Enterprises Ltd.