SA-MP Forums Archive
Set Array to Array error - 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: Set Array to Array error (/showthread.php?tid=322033)



Set Array to Array error - gamelaster - 29.02.2012

Hi, im setting array to array and output is error. Code:

new ipvar[1000];
public OnRconLoginAttempt(ip[], password[], success)
{
ipvar[ip] = ipvar[ip] + 1;//error 033: array must be indexed (variable "ip")
return 1;
}

Thx better


Re: Set Array to Array error - Stylock - 29.02.2012

What exactly are you trying to achieve there?


Re: Set Array to Array error - gamelaster - 29.02.2012

its the adding vars for IP


Re: Set Array to Array error - Stylock - 29.02.2012

Are you trying to store all IPs in one array? You can try strins function.


Re: Set Array to Array error - gamelaster - 29.02.2012

How to use strins Im tested this also printing error:
new ipp;
strins(ipp, ip, 50);
error:
error 035: argument type mismatch (argument 1)


Re: Set Array to Array error - Konstantinos - 29.02.2012

pawn Код:
new ipp[ 256 ];
public OnRconLoginAttempt( ip[ ], password[ ], success )
{
    strins( ipp, ip, 15 );
    return 1;
}



Re: Set Array to Array error - gamelaster - 29.02.2012

Ahhh...
ipvar[ipp] = ipvar[ipp] + 1;//error 033: array must be indexed (variable "ipp")


Re: Set Array to Array error - gamelaster - 29.02.2012

Please, how to fix :/