SA-MP Forums Archive
How to Return Multible Variables - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Plugin Development (https://sampforum.blast.hk/forumdisplay.php?fid=18)
+--- Thread: How to Return Multible Variables (/showthread.php?tid=112925)



How to Return Multible Variables - Hummtaro - 11.12.2009

Hi People,
i momentary will create a plugin for samp like this example:

Код:
new result;
new entry = 4;
Summate5(entry, result) //This Function Summate 5 to the variable "entry" (4+5) and write the result to the variable "result"
echo result; //This views no the value 9
how i can create a function like this?

Greets
Hummtaro

//Sry for my bad English


Re: How to Return Multible Variables - yom - 11.12.2009

You don't return multiple values in your example. This topic might be useful for you: http://forum.sa-mp.com/index.php?topic=85070.0


Re: How to Return Multible Variables - Hummtaro - 11.12.2009

Код:
new result1, result2;
new entry = 4;
Summate(entry, result1, result2)//result1 output the result of entry+1 | result2 output the result of entry+2
echo result1; //This views no the value 5
echo result2; //This views no the value 6
So, this example are better



Re: How to Return Multible Variables - Streetplaya - 11.12.2009

Quote:
Originally Posted by 0rb
This topic might be useful for you: http://forum.sa-mp.com/index.php?topic=85070.0
^

If you actually want to have a scripting language that supports returning multiple variables, check this: http://forum.sa-mp.com/index.php?topic=133891.0