: error 001
#1

hi guys tell me how can i fix him

: error 001: expected token: ";", but found "]"

function610(arg0, arg1)
{
new var0 = strlen(arg1);
new var1 = 0;
for(var1 = 0; var1 < var0; var1++)
{
arg0[var1] = arg1[var1];
}
arg0[var0] = 0;
return 0;
}
Reply
#2

upppppp
Reply
#3

heeeeeeeeeeeeeeeelp plz
Reply
#4

what do you use it for?
Reply
#5

uppp
Help me plz
Reply
#6

You have a missed token.
The error is where exactly ?
here ? for(var1 = 0; var1 < var0; var1++)
Reply
#7

for(var1 = 0; var1 < var0; var1++) Really man? o_O


for(var1 = 0 "Else" blabla var1 < var0; var1++)
Reply
#8

here: arg0[var1] = arg1[var1];
Reply
#9

It gives the error because it expects arrays as parameters but it founds integers:
pawn Код:
function610(arg0[], arg1[])
Nonetheless, I believe you want this function to copy a string to another but you can use strcat for that:
pawn Код:
#define strcpy(%0,%1) strcat((%0[0] = '\0', %0), %1)
and an example:
pawn Код:
new
    string[5],
    string2[5] = "test";

strcpy(string, string2, 5);
string now holds "test" too.
Reply
#10

please come teamviewer : 744 367 525 pass: 5130
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)