SA-MP Forums

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

Thread Tools Display Modes
Old 11/10/2009, 11:11 AM   #1
Join Date: May 2008
Posts: 515
Reputation: 0
Default Optional Parameters

How to make function with optional parameter? Like this:
forward Func(param, const text[] = "");
public Func(param, const text[] = "")
// code here
return 1;
How to make that parameter text[] would be optional? If i don't write anything there, then it would be just "" ?
Dreftas is offline  
Old 11/10/2009, 11:34 AM   #2
Nero_3D's Avatar
Join Date: Jun 2007
Location: Germany
Posts: 2,804
Reputation: 647
Default Re: Optional Parameters

that works with stock or just nothing
Nero_3D 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
Optional parameters? Gozerr Help Archive 1 27/02/2010 02:21 PM
Sm like an optional Parameter Rauminator Help Archive 2 06/02/2010 05:40 PM
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 06:52 PM.

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