• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
[Pawn] How can I resolve this?
#1
Question 
Hello, I'm trying to create a function with several parameters in string format, but I don't know how to do it, as it's returning the following error:
Code:
error 067: variable cannot be both a reference and an array (variable "string1")

PHP Code:
new string1[15],string2[15];
stock MyFunction(&string1[15],&string2[15])
{
//Some code
string1 ="Hello";
string2 ="Hello 2";


FIXED!

Just removed the &
  Reply
#2
FIXED!

Just removed the &

Code:
new string1[15],string2[15];
stock MyFunction(string1[15],string2[15])
{
//Some code
string1 ="Hello";
string2 ="Hello 2";
}
  Reply


Forum Jump: