i want a Little help in script
#4

For example.. its like..
Quote:

new destination[8];
new msg[] = "Hello World!";

destination = msg;

it had errros same as yours... change it to..

Quote:

new destination[13];
new msg[] = "Hello World!";

destination = msg;

For array assignment, the arrays on the left and the right side of the assignment operator must have the same number of dimensions. In addition:
for multi-dimensional arrays, both arrays must have the same size;
for single arrays with a single dimension, the array on the left side of the assignment operator must have a size that is equal or bigger than the one on the right side.

In the above code, we try to fit 12 characters in an array that can only support 8. By increasing the array size of the destination, we can solve this. Note that a string also requires a null terminator so the total length of "Hello World!" plus the null terminator is, in fact, 13...
Reply


Messages In This Thread
i want a Little help in script - by chintan - 31.07.2014, 08:51
Re: i want a Little help in script - by chintan - 31.07.2014, 08:54
Respuesta: i want a Little help in script - by ghost556 - 31.07.2014, 09:02
Re: i want a Little help in script - by Ritzy2K - 31.07.2014, 09:14
Re: i want a Little help in script - by chintan - 31.07.2014, 09:27

Forum Jump:


Users browsing this thread: 2 Guest(s)