16.08.2011, 01:54
pawn Code:
stock asd(string[],&string1[],&string2[])//Fail
stock asd(string[],&string1,&string2)//Fail
return string1,string2;//??
Anyone can help me?
stock asd(string[],&string1[],&string2[])//Fail
stock asd(string[],&string1,&string2)//Fail
return string1,string2;//??
stock asd(string[],&string1[],&string2[])
&string1[],&string2[]
stock StockPasses2String(&string1[],len1,&string2[],len2)
{
new TempStringOrSomthing[32] = "I equal nothing important";
for(new i=0;i<len1;i++)
{
string1[i] = TempStringOrSomthing[i];
}
TempStringOrSomthing = "I Have Changed To Something Else";
for(new i=0;i<len2;i++)
{
string2[i] = TempStringOrSomthing[i];
}
}
when you use this one
pawn Code:
|
What is with the & sign before the string names?
pawn Code:
|
not really returning 2 string however you can pass strings through stocks and have them change, here's a quick example
pawn Code:
|
Yes I did. It give error on that line.
https://sampwiki.blast.hk/wiki/Stocks#Re...ultiple_values variable cannot be both a reference and an array (variable "string1") |