SA-MP Forums Archive
must be assigned to an array - 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: must be assigned to an array (/showthread.php?tid=619543)



must be assigned to an array - NeXoR - 19.10.2016

Hey guys, got a clue ?
PHP код:
    new s[4][5], num1num2num3num4string[40];
    
sscanf(ip"p<.>s[5]s[5]s[5]s[5]"s[0], s[1], s[2], s[3]);
    for(new 
04i++)
    {
        if(!
IsNumeric(s[i]))
        {
            for(new 
05j++)
            {
                switch(
s[i][j])
                {
                    case 
0..9: continue;
                     default: 
s[i][j] = "";
                }
            }
        }
    } 
Код:
error 006: must be assigned to an array
PHP код:
default: s[i][j] = ""



Re: must be assigned to an array - SickAttack - 19.10.2016

Why are you even using SSCANF?

They can literally put characters in between and they'll bypass your system. Or like instead of periods/points, they can just write the IP with commas.

Refer to your other thread.