• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
[Server] error 090: public functions may not return arrays (symbol "GetRegionName")
#1
Why i'm getting this error:



error 090: public functions may not return arrays (symbol "GetRegionName")

return string;



on this:



Code:
forward GetRegionName(Float: X, Float: Y, Float: Z);

public GetRegionName(Float: X, Float: Y, Float: Z) {

? ? new string[128];

? ? format(string, sizeof(string), "Idlewood");

? ? return string;

}
  Reply
#2
i've change:

Code:
forward GetRegionName(Float: X, Float: Y, Float: Z);

public GetRegionName(Float: X, Float: Y, Float: Z) {

    new string[128];

    format(string, sizeof(string), "Idlewood");

    return string;

}



to

Code:
stock GetRegionName(Float: X, Float: Y, Float: Z) {

    new string[128];

    format(string, sizeof(string), "Idlewood");

    return string;

}



works but idk why
  Reply


Forum Jump: