SA-MP Forums

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

Reply
 
Thread Tools Display Modes
Old 28/05/2009, 05:25 PM   #11
miokie
High-roller
 
miokie's Avatar
 
Join Date: Jan 2007
Location: Bedfordshire, England
Posts: 1,400
Reputation: 13
Default Re: [TUT] numargs, getarg and setarg

Nice job!
Thanks.
__________________
miokie is offline   Reply With Quote
Old 28/05/2009, 06:21 PM   #12
Nero_3D
High-roller
 
Nero_3D's Avatar
 
Join Date: Jun 2007
Location: Germany
Posts: 3,757
Reputation: 646
Default Re: [TUT] numargs, getarg and setarg

Good job but to find out about that you just need ****** and the search button of this forum...
__________________
Nero_3D is offline   Reply With Quote
Old 12/10/2009, 06:22 PM   #13
Google63
Big Clucker
 
Join Date: Jun 2008
Posts: 130
Reputation: 0
Default Re: [TUT] numargs, getarg and setarg

Actually it isn't really infinite, it is limited by allocated memory :P
Google63 is offline   Reply With Quote
Old 27/01/2010, 04:16 PM   #14
chhris
Little Clucker
 
Join Date: Feb 2009
Posts: 3
Reputation: 0
Default Re: [TUT] numargs, getarg and setarg

Hi guys
[font=Comic Sans MS][b]
I need help with this.
It is very good tutorial but i have small problem and i need resolved this problem.
I hope that you will help me.

Ok
My experience with the stocks are small.
I create new Language System. And I need it to complete.

This is my stock.
Code:
stock SendLanguageMessage(playerid, color, text[], ...)
{
 	new file[256];
	new translation[256];
	new string[256];

	format(file,sizeof(file),"Studio/Languages/%s.txt", Info[playerid][Translation]);


	translation = dini_Get(file,text);

 	format(string,sizeof(string), translation,...);

	SendClientMessage(playerid, color, string);

	return 1;
}
[font=Comic Sans MS][b]
This essentially finds the text of the folder, depending on what language you have chosen. This text is sent with it but at the end that gives infinite parameters.

This is so to shorten this
Code:
new string[256];
format(string, sizeof(string), "Welcome back in ...");
SendClientMessage(playerid, color, string);

I do not know exactly what they should be used.

Please help.
chhris is offline   Reply With Quote
Old 27/01/2010, 05:01 PM   #15
Cry_Wolf
Big Clucker
 
Join Date: Jan 2010
Posts: 99
Reputation: 0
Default Re: [TUT] numargs, getarg and setarg

Thanks man, very usefull tutorial.
I will read this soon :P.
Cry_Wolf is offline   Reply With Quote
Old 27/01/2010, 05:04 PM   #16
Westie
Gangsta
 
Westie's Avatar
 
Join Date: Jul 2009
Posts: 863
Reputation: 63
Default Re: [TUT] numargs, getarg and setarg

As far as I know, there's a limit of 128 arguments that can be passed to a function.
Westie is offline   Reply With Quote
Old 28/01/2010, 01:20 PM   #17
[nl]daplayer
Huge Clucker
 
Join Date: Dec 2007
Posts: 291
Reputation: 25
Default Re: [TUT] numargs, getarg and setarg

Quote:
Originally Posted by chhris
Hi guys
........
Please help.
Did you actually read this tutorial?, you can't use ... in formats.
If you have read this tutorial you would have known that you must use getarg to get param arguments.

Quote:
Originally Posted by /^We(stie|z+[e|a
r)$/ ]
As far as I know, there's a limit of 128 arguments that can be passed to a function.
Ok, added in tutorial...

Thx.
[nl]daplayer is offline   Reply With Quote
Old 28/01/2010, 01:48 PM   #18
chhris
Little Clucker
 
Join Date: Feb 2009
Posts: 3
Reputation: 0
Default Re: [TUT] numargs, getarg and setarg

I see you're right. But he knew would help me
chhris is offline   Reply With Quote
Old 06/07/2018, 05:56 PM   #19
Xaparrito
Little Clucker
 
Xaparrito's Avatar
 
Join Date: May 2013
Posts: 10
Reputation: 0
Default Re: [TUT] numargs, getarg and setarg

stock TestFunction(playerid, {Menu}:...) this one makes, just to set a player online in the server, or am I wrong?. I īm just reviewing to see the attachments to the scripts of setarg and getarg.
Xaparrito is offline   Reply With Quote
Reply

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
getarg with OnTimerEx bug? Bpb Help Archive 2 08/10/2009 12:05 PM


All times are GMT. The time now is 01:36 AM.


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