[Help]Got Errors while compile
#1

When I compile my server.pwn I awlays get this errors dont know what is the proplems



C:\Users\Yasser\Desktop\SKINS\gamemodes\usrp.pwn(1 4940) : error 021: symbol already defined: "strtok"
C:\Users\Yasser\Desktop\SKINS\gamemodes\usrp.pwn(1 4955) : error 047: array sizes do not match, or destination array is too small
C:\Users\Yasser\Desktop\SKINS\gamemodes\usrp.pwn(1 5994) : error 047: array sizes do not match, or destination array is too small
C:\Users\Yasser\Desktop\SKINS\gamemodes\usrp.pwn(1 6033) : error 047: array sizes do not match, or destination array is too small
C:\Users\Yasser\Desktop\SKINS\gamemodes\usrp.pwn(1 6040) : error 047: array sizes do not match, or destination array is too small
C:\Users\Yasser\Desktop\SKINS\gamemodes\usrp.pwn(1 6113) : error 047: array sizes do not match, or destination array is too small
C:\Users\Yasser\Desktop\SKINS\gamemodes\usrp.pwn(1 625 : error 047: array sizes do not match, or destination array is too small
C:\Users\Yasser\Desktop\SKINS\gamemodes\usrp.pwn(1 628 : error 047: array sizes do not match, or destination array is too small
C:\Users\Yasser\Desktop\SKINS\gamemodes\usrp.pwn(1 631 : error 047: array sizes do not match, or destination array is too small
C:\Users\Yasser\Desktop\SKINS\gamemodes\usrp.pwn(1 6436) : error 047: array sizes do not match, or destination array is too small
C:\Users\Yasser\Desktop\SKINS\gamemodes\usrp.pwn(1 6621) : error 047: array sizes do not match, or destination array is too small
C:\Users\Yasser\Desktop\SKINS\gamemodes\usrp.pwn(1 6630) : error 047: array sizes do not match, or destination array is too small
C:\Users\Yasser\Desktop\SKINS\gamemodes\usrp.pwn(1 665 : error 047: array sizes do not match, or destination array is too small
C:\Users\Yasser\Desktop\SKINS\gamemodes\usrp.pwn(1 6682) : error 047: array sizes do not match, or destination array is too small
C:\Users\Yasser\Desktop\SKINS\gamemodes\usrp.pwn(1 7829) : error 047: array sizes do not match, or destination array is too small
C:\Users\Yasser\Desktop\SKINS\gamemodes\usrp.pwn(1 8180) : error 047: array sizes do not match, or destination array is too small
C:\Users\Yasser\Desktop\SKINS\gamemodes\usrp.pwn(1 8189) : error 047: array sizes do not match, or destination array is too small
C:\Users\Yasser\Desktop\SKINS\gamemodes\usrp.pwn(1 825 : error 047: array sizes do not match, or destination array is too small
C:\Users\Yasser\Desktop\SKINS\gamemodes\usrp.pwn(1 8267) : error 047: array sizes do not match, or destination array is too small
C:\Users\Yasser\Desktop\SKINS\gamemodes\usrp.pwn(1 8411) : error 047: array sizes do not match, or destination array is too small
C:\Users\Yasser\Desktop\SKINS\gamemodes\usrp.pwn(1 8449) : error 047: array sizes do not match, or destination array is too small
C:\Users\Yasser\Desktop\SKINS\gamemodes\usrp.pwn(1 8495) : error 047: array sizes do not match, or destination array is too small
C:\Users\Yasser\Desktop\SKINS\gamemodes\usrp.pwn(1 8685) : error 047: array sizes do not match, or destination array is too small
C:\Users\Yasser\Desktop\SKINS\gamemodes\usrp.pwn(1 8750) : error 047: array sizes do not match, or destination array is too small
C:\Users\Yasser\Desktop\SKINS\gamemodes\usrp.pwn(1 875 : error 047: array sizes do not match, or destination array is too small
C:\Users\Yasser\Desktop\SKINS\gamemodes\usrp.pwn(1 8812) : error 047: array sizes do not match, or destination array is too small

Compilation aborted.Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase


26 Errors.
Reply
#2

Show us the code, and the line of the code.
Reply
#3

strtok(const string[], &index)
{
new length = strlen(string);
while ((index < length) && (string[index] <= ' '))
{
index++;
}

new offset = index;
new result[20];
while ((index < length) && (string[index] > ' ') && ((index - offset) < (sizeof(result) - 1)))
{
result[index - offset] = string[index];
index++;
}
result[index - offset] = EOS;
return result;
}
Reply
#4

You forgot a closing bracket..
Try this one.
pawn Code:
strtok(const string[], &index)
{
    new length = strlen(string);
    while ((index < length) && (string[index] <= ' ')) {
        index++;
    }

    new offset = index;
    new result[20];
    while ((index < length) && (string[index] > ' ') && ((index - offset) < (sizeof(result) - 1))) {
        result[index - offset] = string[index];
        index++;
    }
    result[index - offset] = EOS;
    return result;
}
I'm not sure it help anyway, try running a closing bracket program on the script.
Reply
#5

Code:
C:\Users\Yasser\Desktop\SKINS\gamemodes\usrp.pwn(14940) : error 021: symbol already defined: "strtok"
C:\Users\Yasser\Desktop\SKINS\gamemodes\usrp.pwn(14953) : error 047: array sizes do not match, or destination array is too small
C:\Users\Yasser\Desktop\SKINS\gamemodes\usrp.pwn(15992) : error 047: array sizes do not match, or destination array is too small
C:\Users\Yasser\Desktop\SKINS\gamemodes\usrp.pwn(16031) : error 047: array sizes do not match, or destination array is too small
C:\Users\Yasser\Desktop\SKINS\gamemodes\usrp.pwn(16038) : error 047: array sizes do not match, or destination array is too small
C:\Users\Yasser\Desktop\SKINS\gamemodes\usrp.pwn(16111) : error 047: array sizes do not match, or destination array is too small
C:\Users\Yasser\Desktop\SKINS\gamemodes\usrp.pwn(16256) : error 047: array sizes do not match, or destination array is too small
C:\Users\Yasser\Desktop\SKINS\gamemodes\usrp.pwn(16286) : error 047: array sizes do not match, or destination array is too small
C:\Users\Yasser\Desktop\SKINS\gamemodes\usrp.pwn(16316) : error 047: array sizes do not match, or destination array is too small
C:\Users\Yasser\Desktop\SKINS\gamemodes\usrp.pwn(16434) : error 047: array sizes do not match, or destination array is too small
C:\Users\Yasser\Desktop\SKINS\gamemodes\usrp.pwn(16619) : error 047: array sizes do not match, or destination array is too small
C:\Users\Yasser\Desktop\SKINS\gamemodes\usrp.pwn(16628) : error 047: array sizes do not match, or destination array is too small
C:\Users\Yasser\Desktop\SKINS\gamemodes\usrp.pwn(16656) : error 047: array sizes do not match, or destination array is too small
C:\Users\Yasser\Desktop\SKINS\gamemodes\usrp.pwn(16680) : error 047: array sizes do not match, or destination array is too small
C:\Users\Yasser\Desktop\SKINS\gamemodes\usrp.pwn(17827) : error 047: array sizes do not match, or destination array is too small
C:\Users\Yasser\Desktop\SKINS\gamemodes\usrp.pwn(18178) : error 047: array sizes do not match, or destination array is too small
C:\Users\Yasser\Desktop\SKINS\gamemodes\usrp.pwn(18187) : error 047: array sizes do not match, or destination array is too small
C:\Users\Yasser\Desktop\SKINS\gamemodes\usrp.pwn(18256) : error 047: array sizes do not match, or destination array is too small
C:\Users\Yasser\Desktop\SKINS\gamemodes\usrp.pwn(18265) : error 047: array sizes do not match, or destination array is too small
C:\Users\Yasser\Desktop\SKINS\gamemodes\usrp.pwn(18409) : error 047: array sizes do not match, or destination array is too small
C:\Users\Yasser\Desktop\SKINS\gamemodes\usrp.pwn(18447) : error 047: array sizes do not match, or destination array is too small
C:\Users\Yasser\Desktop\SKINS\gamemodes\usrp.pwn(18493) : error 047: array sizes do not match, or destination array is too small
C:\Users\Yasser\Desktop\SKINS\gamemodes\usrp.pwn(18683) : error 047: array sizes do not match, or destination array is too small
C:\Users\Yasser\Desktop\SKINS\gamemodes\usrp.pwn(18748) : error 047: array sizes do not match, or destination array is too small
C:\Users\Yasser\Desktop\SKINS\gamemodes\usrp.pwn(18756) : error 047: array sizes do not match, or destination array is too small
C:\Users\Yasser\Desktop\SKINS\gamemodes\usrp.pwn(18810) : error 047: array sizes do not match, or destination array is too small

Compilation aborted.Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


26 Errors.
Reply
#6

One more bracket is forgoten also,give us your code from that strtok
or add one { before strtok
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)