SA-MP Forums Archive
Error in compilation - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: Error in compilation (/showthread.php?tid=415992)



Error in compilation - xRuffles - 15.02.2013

My GM with few errors this could help me?

Errors :
Код:
C:\Users\CASA\Desktop\Brasil Hard Life\gamemodes\BTW2.pwn(20106) : error: 021: symbol already defined: "strtok"
Код:
C:\Users\CASA\Desktop\Brasil Hard Life\gamemodes\BTW2.pwn(20119) : error: 047: array sizes do not match, or destination array is too small

Who can help me I will be grateful


Re: Error in compilation - xRuffles - 15.02.2013

Lines :

Код:
strtok(const string[], &index)
{   // here <<
    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; // Here <<
}



Re: Error in compilation - xRuffles - 15.02.2013

Help ? ¬¬'


Re: Error in compilation - YoYo123 - 15.02.2013

Don't bump after 15 minutes..

For the first error you either already have that function in the script or you have it in an include. The function can be found in 'gl_common.inc' so if you included that file in the script remove the function.
That should also fix the second error.


Re: Error in compilation - xRuffles - 15.02.2013

Quote:
Originally Posted by YoYo123
Посмотреть сообщение
Don't bump after 15 minutes..

For the first error you either already have that function in the script or you have it in an include. The function can be found in 'gl_common.inc' so if you included that file in the script remove the function.
That should also fix the second error.
Even given the 2 errors !


Re: Error in compilation - xRuffles - 15.02.2013

Help ?


Re: Error in compilation - xRuffles - 15.02.2013

'-' Help - me


Re: Error in compilation - xRuffles - 15.02.2013

Help help help help


Re: Error in compilation - TheArcher - 15.02.2013

delete strok function, it's already on your gamemode somewhere twice.


Re: Error in compilation - xRuffles - 15.02.2013

Quote:
Originally Posted by TheArcher
Посмотреть сообщение
delete strok function, it's already on your gamemode somewhere twice.
Cara worked kkk deleted at the end of GM, and was compiled with Success


Thank You