SA-MP Forums Archive
EROR - 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: EROR (/showthread.php?tid=346143)



EROR - 3RoR - 27.05.2012

Why is show's me eror ?? in this code
CODE:
pawn Код:
split(fstr, farray, ',');
EROR:
Код:
C:\Users\pc\Desktop\Web Properties\GameModovi\***** GAME MOD\filterscripts\tunesave.pwn(2450) : error 017: undefined symbol "split"



Re: EROR - Edward156 - 27.05.2012

Do you have "split" defined?


Re: EROR - justinnater - 27.05.2012

Try forwarding it:

forward split(const strsrc[], strdest[][], delimiter);

And public it:

PHP код:
public split(const strsrc[], strdest[][], delimiter)
{
    new 
ili;
    new 
aNum;
    new 
len;
    while(
<= strlen(strsrc)){
        if(
strsrc[i]==delimiter || i==strlen(strsrc)){
            
len strmid(strdest[aNum], strsrclii128);
            
strdest[aNum][len] = 0;
            
li i+1;
            
aNum++;
        }
        
i++;
    }
    return 
1;




Re: EROR - ViniBorn - 27.05.2012

pawn Код:
forward split(const strsrc[], strdest[][], delimiter);
public split(const strsrc[], strdest[][], delimiter)
{
    new i, li;
    new aNum;
    new len;
    while(i <= strlen(strsrc)){
        if(strsrc[i]==delimiter || i==strlen(strsrc)){
            len = strmid(strdest[aNum], strsrc, li, i, 128);
            strdest[aNum][len] = 0;
            li = i+1;
            aNum++;
        }
        i++;
    }
    return 1;
}