SA-MP Forums Archive
error complie - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP (https://sampforum.blast.hk/forumdisplay.php?fid=3)
+--- Forum: Client Support (https://sampforum.blast.hk/forumdisplay.php?fid=16)
+--- Thread: error complie (/showthread.php?tid=545060)



error complie - acforcenon1 - 05.11.2014

i can't complie my gm
Код HTML:
C:\Users\Alecs\AppData\Local\Temp\fz3temp-1\CG.pwn(198) : error 017: undefined symbol "ret_mempcy"
C:\Users\Alecs\AppData\Local\Temp\fz3temp-1\CG.pwn(22079) : error 017: undefined symbol "strtok"
C:\Users\Alecs\AppData\Local\Temp\fz3temp-1\CG.pwn(22079) : error 033: array must be indexed (variable "cmd")
C:\Users\Alecs\AppData\Local\Temp\fz3temp-1\CG.pwn(22129) : error 017: undefined symbol "strtok"
C:\Users\Alecs\AppData\Local\Temp\fz3temp-1\CG.pwn(22129) : error 033: array must be indexed (variable "tmp")
C:\Users\Alecs\AppData\Local\Temp\fz3temp-1\CG.pwn(22195) : error 017: undefined symbol "strtok"
C:\Users\Alecs\AppData\Local\Temp\fz3temp-1\CG.pwn(22195) : error 033: array must be indexed (variable "tmp")
C:\Users\Alecs\AppData\Local\Temp\fz3temp-1\CG.pwn(22336) : error 017: undefined symbol "strtok"
C:\Users\Alecs\AppData\Local\Temp\fz3temp-1\CG.pwn(22336) : error 033: array must be indexed (variable "tmp")
C:\Users\Alecs\AppData\Local\Temp\fz3temp-1\CG.pwn(22370) : error 017: undefined symbol "strtok"
C:\Users\Alecs\AppData\Local\Temp\fz3temp-1\CG.pwn(22370) : error 033: array must be indexed (variable "tmp")
C:\Users\Alecs\AppData\Local\Temp\fz3temp-1\CG.pwn(22506) : error 017: undefined symbol "strtok"
C:\Users\Alecs\AppData\Local\Temp\fz3temp-1\CG.pwn(22506) : error 033: array must be indexed (variable "tmp")
C:\Users\Alecs\AppData\Local\Temp\fz3temp-1\CG.pwn(22578) : error 017: undefined symbol "strtok"
C:\Users\Alecs\AppData\Local\Temp\fz3temp-1\CG.pwn(22578) : error 033: array must be indexed (variable "tmp")
C:\Users\Alecs\AppData\Local\Temp\fz3temp-1\CG.pwn(22603) : error 017: undefined symbol "strtok"
C:\Users\Alecs\AppData\Local\Temp\fz3temp-1\CG.pwn(22603) : error 033: array must be indexed (variable "tmp")
C:\Users\Alecs\AppData\Local\Temp\fz3temp-1\CG.pwn(22610) : error 017: undefined symbol "strtok"
C:\Users\Alecs\AppData\Local\Temp\fz3temp-1\CG.pwn(22610) : error 033: array must be indexed (variable "tmp")
C:\Users\Alecs\AppData\Local\Temp\fz3temp-1\CG.pwn(22636) : error 017: undefined symbol "strtok"
C:\Users\Alecs\AppData\Local\Temp\fz3temp-1\CG.pwn(22636) : error 033: array must be indexed (variable "tmp")



Re: error complie - Sew_Sumi - 06.11.2014

You need to read up on strtok on the wiki, and search for ret_mempcy while you're at it.

They're both undefined yet your script uses them, and that's what the error is saying.

The parameters are also not being indexed, but chances are by fixing strtok, those errors should also disappear.


Re: error complie - acforcenon1 - 06.11.2014

Now say
C:\Users\Alecs\Desktop\CsGaming.pwn(19 : error 017: undefined symbol "ret_memcpy"
C:\Users\Alecs\Desktop\CsGaming.pwn(47741) : error 017: undefined symbol "strtok2"
C:\Users\Alecs\Desktop\CsGaming.pwn(47741) : error 033: array must be indexed (variable "reason")


Respuesta: error complie - !R1Ch@rD! - 06.11.2014

I put these 2 works or you have it on?

pawn Код:
#pragma unused ret_memcpy
strock

pawn Код:
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;
}
you can look good

Strock use


Re: error complie - acforcenon1 - 06.11.2014

Now

C:\Users\Alecs\Desktop\etca\CG.pwn(17) : error 017: undefined symbol "ret_memcpy"
C:\Users\Alecs\Desktop\etca\CG.pwn(199) : error 017: undefined symbol "ret_mempcy"


Re: error complie - Djean - 06.11.2014

Could u show us lines 17 and 199 . There we can help you further.


Re: error complie - acforcenon1 - 06.11.2014

17. new Float:ST[3];
199. #define MAX_TRUNK_SLOTS (5) // Is actually 4.


Re: Respuesta: error complie - Sew_Sumi - 06.11.2014

Quote:
Originally Posted by !R1Ch@rD!
Посмотреть сообщение
I put these 2 works or you have it on?

pawn Код:
#pragma unused ret_memcpy
strock

pawn Код:
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;
}
you can look good

Strock use
Posting up pure fixes without any "need" for reading, doesn't teach people anything except copy and paste.

The problem is his code, and he needs to read it to find it, and to fix it he must know how to script.


By doing it for him, you end up with a "scripter" who can't read code, nor write it.


Respuesta: Re: Respuesta: error complie - !R1Ch@rD! - 07.11.2014

Quote:
Originally Posted by Sew_Sumi
Посмотреть сообщение
Posting up pure fixes without any "need" for reading, doesn't teach people anything except copy and paste.

The problem is his code, and he needs to read it to find it, and to fix it he must know how to script.


By doing it for him, you end up with a "scripter" who can't read code, nor write it.
ahhh Tonce teacher teaches greetings !! ;')


Re: error complie - acforcenon1 - 07.11.2014

I resolve thanks all