Passing back strings
#1

I have a function, and I want in the parameters a reference to a string.

So just like:

pawn Код:
new name[MAX_PLAYER_NAME+1];
GetPlayerName(playerid,name,sizeof(name));
I have:
pawn Код:
stock getFreePlateID(&plateID,&plate[]) {
  ..... some code
  format(plate,8,"%s",plateFromDatabase);
  ..... some more code
  return 1;
}


new plateID, plateText[8];
getFreePlateID(playeID,plateText);
But I get the error: "variable cannot be both a reference and an array (variable 'plate')"

Any ideas?

Thanks, Grim.
Reply


Messages In This Thread
Passing back strings - by Grimrandomer - 06.02.2013, 20:28
Re: Passing back strings - by Vince - 06.02.2013, 20:32
Re: Passing back strings - by Grimrandomer - 06.02.2013, 20:50

Forum Jump:


Users browsing this thread: 1 Guest(s)