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, 12:11 PM   #1
Dreftas
Gangsta
 
Join Date: May 2008
Posts: 639
Reputation: 0
Default Optional Parameters

How to make function with optional parameter? Like this:
Code:
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, 12:34 PM   #2
Nero_3D
High-roller
 
Nero_3D's Avatar
 
Join Date: Jun 2007
Location: Germany
Posts: 3,744
Reputation: 646
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 01:36 AM
Optional parameters? Gozerr Help Archive 1 27/02/2010 03:21 PM
Sm like an optional Parameter Rauminator Help Archive 2 06/02/2010 06:40 PM
using sscanf for optional integer inputs at the end of a command ( possible?) iLinx Help Archive 1 31/07/2009 09:00 PM


All times are GMT. The time now is 10:01 PM.


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