1 error
#1

Код:
new tmp1[256], tmp2[256];	tmp1 = strtok(cmdtext, idx);, tmp2 = strtok(cmdtext, idx);
it gives an error anyone know how to fix?

Код:
error 029: invalid expression, assumed zero
Reply
#2

pawn Код:
new tmp1[256], tmp2[256];   tmp1 = strtok(cmdtext, idx), tmp2 = strtok(cmdtext, idx);
Try with this... I'm not sure...
Reply
#3

or try this

Код:
new tmp1[256], tmp2[256];	tmp1 = strtok(cmdtext, idx); tmp2 = strtok(cmdtext, idx);
Reply
#4

or try this

Код:
new tmp1[256], tmp2[256];
tmp1 = strtok(cmdtext, idx);
tmp2 = strtok(cmdtext, idx);
Reply
#5

And try not to use 256 cells when you don't need them.
Reply
#6

Quote:
Originally Posted by Don Correlli
And try not to use 256 cells when you don't need them.
well can u tell me what's the diffrence in cells , like what is diffrent between : new string[128] and new string[256]?
Reply
#7

Quote:
Originally Posted by [AC
Etch ]
well can u tell me what's the diffrence in cells , like what is diffrent between : new string[128] and new string[256]?
Learn PAWN basics and you'll know. That is the basic thing.

http://forum.sa-mp.com/index.php?topic=78026.90
Reply
#8

Quote:
Originally Posted by [AC
Etch ]
Код:
new tmp1[256], tmp2[256];	tmp1 = strtok(cmdtext, idx);, tmp2 = strtok(cmdtext, idx);
it gives an error anyone know how to fix?

Код:
error 029: invalid expression, assumed zero
pawn Код:
new tmp1[128], tmp2[128];
tmp1 = strtok(cmdtext, idx);
tmp2 = strtok(cmdtext, idx);
fixed.

On the cells point, if you have too many cells in your script you will waste memory. = Not good. You should basically never use 256 cells because the SA:MP chat box can only output 128 characters and can only input 128 characters.
Reply
#9

thnx 4 the tutorial very much
Reply
#10

Thanks, even i learnt from this when i wasn't supposed too...
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)