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



Enumeration problem - masuzaron - 21.02.2019

I want to be able to select first row of the MafiaGrade and loop all grades there an display them but I am getting some errors when I try to do that.

PHP код:
enum GradeInfo
{
    
gLevel,
    
Float:gArmor,
    
gName[33][] // Line 457 - [33] Lenght of the grade name, [] Number of grade names
}; // Line 458
new MafiaGrade[][GradeInfo] = 
{
    { 
210.0, { "Grade 1""Grade 2""Grade 3"} },
    { 
350.0, { "Grade 1" } },
    { 
5100.0, { "Grade 1" } }
}; 
Код:
Strangers_DM.pwn(457) : error 001: expected token: "}", but found "["
Strangers_DM.pwn(458) : error 010: invalid function or declaration



Re: Enumeration problem - Kaliber - 21.02.2019

That would produce a 4d array, but that is not possible with the normal compiler.

You could use another compiler or just treat the variable for the Name seperatly