How to Return Multible Variables
#1

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
Reply
#2

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
Reply
#3

Код:
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
Reply
#4

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
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)