public StatsMenu(playerid) { new playername[24]; GetPlayerName(playerid, playername, sizeof(playername)); new file[64]; format(file, sizeof(file), "eSportsGaming/Users/%s.ini", playername); new string1[100]; new string2[100]; new hours = dini_Int(file, "Hours"); new cash = dini_Int(file, "Cash"); new alvl = dini_Int(file, "AdminLevel"); new skin = dini_Int(file, "Skin"); new guide = dini_Int(file, "HasGuide"); new dlic = dini_Int(file, "DriveLic"); switch(guide) { case 0: guide = "No"; case 1: guide = "Yes"; } format(string1, sizeof(string1), "Playing Hours: [%d] Cash: [$%d] Admin Level: [Lv. %d] Skin ID: [ID: %d]", hours, cash, alvl, skin); format(string2, sizeof(string2), "Guide: [%s] Driving License: [%s] Sailing License: [%s] Flying License: [%s] Weapon License: [%s]", guide, dlic); SendClientMessage(playerid, COLOR_GREEN, "[====================| Stats Menu |====================]"); SendClientMessage(playerid, COLOR_LGREEN, string1); return 1; } |
error 006: must be assigned to an array error 006: must be assigned to an array |
new guide = dini_Int(file, "HasGuide");
format(string2, sizeof(string2), "Guide: [%s] Driving License: [%s] Sailing License: [%s] Flying License: [%s] Weapon License: [%s]", (guide == 1) ? ("Yes") : ("No"), dlic);
(guide == 1) ? ("Yes") : ("No")
if(guide == 1)
{
"yes"
}
else
{
"no"
}
format(str, sizeof(str), "%s", "Hello! :D");
new guide[3];
switch(guide)
{
case 0: guide = ''No'';
case 1: guide = "Yes";
}
new guide = dini_int(...);
new Guide[3];
format(Guide, "%s", (guide == 1) ? ("Yes") : ("No"));
format(str, sizeof(str)," Guide: %s ", Guide);