Posts: 1,506
Threads: 69
Joined: Feb 2008
Well what I'd like to do is set an enum value from a string;
Example
pawn Код:
format(string, 8, "something");
CarSystem[i][some] = string;
But It gives me;
error 006: must be assigned to an array
Assigned to an array? What does that mean?
(Never worked with It before)
Posts: 2,593
Threads: 38
Joined: Aug 2007
Reputation:
0
You have to use format directlyon tge enum
Format(CarSystem[i][some],64,"%s",cheese);
Posts: 1,506
Threads: 69
Joined: Feb 2008
Posts: 6,129
Threads: 36
Joined: Jan 2009
Use strcat(), it's a much more efficient method in comparison to format() for copying strings.
Posts: 1,506
Threads: 69
Joined: Feb 2008
Quote:
Originally Posted by Calgon
Use strcat(), it's a much more efficient method in comparison to format() for copying strings.
|
Thank you, but It's only going to be done upon starting the server.
Posts: 6,129
Threads: 36
Joined: Jan 2009
Remember it for the future, personally I'd change the code, mainly because it's just one single line that makes a moderate difference.
Quote:
Originally Posted by Cameltoe
strmid also does the same : ))
|
strmid is used to extract characters from a string, not to just copy single strings.