23.06.2010, 17:02
Hello, i made a Stats System but i want to make that if the
variable is 0 that it writes no and is 1 writes yes, here's my script.
Errors i get... The errors are on the two lines with the guide = "no"/"yes" :
variable is 0 that it writes no and is 1 writes yes, here's my script.
Quote:
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; } |
Quote:
error 006: must be assigned to an array error 006: must be assigned to an array |