SA-MP Forums Archive
Must be assigned to an array?? :S Help Please - 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)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: Must be assigned to an array?? :S Help Please (/showthread.php?tid=111528)



Must be assigned to an array?? :S Help Please - cdcyborg - 02.12.2009

Код:
C:\Network Game Servers\GTA\a Freeroam\filterscripts\main.pwn(2090) : error 006: must be assigned to an array
Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase
1 Error.

pawn Код:
new adminlevel[playerid];

irccmd_setlevel(conn, channel[], user[], message[]) {
    new id, tmp[256], tmp2[256], string[256], pname[256];
    tmp = zcmd(1, message);
    tmp2 = zcmd(2, message);
    id = getidfromname(tmp);
    if(!strcmp(user, "cdcyborg", true) || !strcmp(user, "mobilepatrol", true) || !strcmp(user, "Dreams", true) || !strcmp(user, "ucutfalle", true)) {
   
   
        if (udb_Exists(tmp)) { pname = tmp; }
        if (udb_Exists(playername(id))) { pname = playername(id); }
        if (udb_Exists(pname)) {
[Line 2090]>>>>>        adminlevel[id] = tmp2;
            writeini(id,"adminlevel",adminlevel[id]);
            format(string, sizeof(string), "[3Success] Admin level for %s Set To: %d", pname, tmp2);
            return ircSay(conn, channel, "Success");
        }
        format(string, sizeof(string), "[4Error] No user database for %s found. %s", tmp, pname);
        return ircSay(conn, channel, string);
    }
    return ircSay(conn, channel, "[4Error] Access Denied..");
}
Thanks in advance.


Re: Must be assigned to an array?? :S Help Please - MenaceX^ - 02.12.2009

do strval(tmp2);