Assigning strings to a global variable
#5

You probably received an error about the array sizes needing to match. MP2 described it as a literal constant string, doing this:

pawn Код:
new msg[] = "NULL";
In that case, the compiler will only assign 5 cells to that variable. Whereas when you do this:

pawn Код:
new msg[MAX_PLAYERS][128] = "NULL";
... the compiler doesn't know how long msg is at the time you do = "NULL".

Make a little sense, at all?
Reply


Messages In This Thread
Assigning strings to a global variable - by Da_Noob - 23.02.2013, 21:22
Re: Assigning strings to a global variable - by MP2 - 23.02.2013, 21:34
Re: Assigning strings to a global variable - by Da_Noob - 23.02.2013, 21:40
Re: Assigning strings to a global variable - by Misiur - 23.02.2013, 21:46
Re: Assigning strings to a global variable - by Scenario - 23.02.2013, 21:46

Forum Jump:


Users browsing this thread: 2 Guest(s)