PDA

View Full Version : Help with Dutils


iCurse
12/01/2015, 02:57 PM
I'm always getting an error when i'm including Dutils on my script
Ex. #include <Dutils>
Then when i try to compile it, it says
C:\Users\Hadjinoor-PC\Desktop\SAMP DM Server\gamemodes\DM.pwn(230) : warning 203: symbol is never used: "ret_memcpy"

Ironboy
12/01/2015, 03:02 PM
It means ret_memcpy is already defined in your script, remove it either from the script or from the inc
ret_memcpy(source[],index=0,numbytes) {
new tmp[MAX_STRING];
new i=0;
tmp[0]=0;
if (index>=strlen(source)) return tmp;
if (numbytes+index>=strlen(source)) numbytes=strlen(source)-index;
if (numbytes<=0) return tmp;
for (i=index;i<numbytes+index;i++) {
tmp[i-index]=source[i];
if (source[i]==0) return tmp;
}
tmp[numbytes]=0;
return tmp;
}

Threshold
12/01/2015, 03:21 PM
It means ret_memcpy is already defined in your script, remove it either from the script or from the inc
ret_memcpy(source[],index=0,numbytes) {
new tmp[MAX_STRING];
new i=0;
tmp[0]=0;
if (index>=strlen(source)) return tmp;
if (numbytes+index>=strlen(source)) numbytes=strlen(source)-index;
if (numbytes<=0) return tmp;
for (i=index;i<numbytes+index;i++) {
tmp[i-index]=source[i];
if (source[i]==0) return tmp;
}
tmp[numbytes]=0;
return tmp;
}

No, a "Symbol is never used" error, means it is never used...

#pragma unused ret_memcpy
//At the top of your script