02.02.2015, 16:02
Yo guys, I've been doing some work on a new kind of dialog, but I can't seem to fix some certain errors.
Please help me out here :/
Please help me out, thanks
Please help me out here :/
Код:
new giveplayerid = ReturnUser(inputtext); new HistoryString[1024]; new giveplayer[MAX_PLAYER_NAME]; new sext; giveplayer = GetPlayerNameEx(giveplayerid); new marriedto[128]; marriedto = PlayerInfo[giveplayerid][pMarriedTo]; new pmarriedto[MAX_PLAYER_NAME]; pmarriedto = GetPlayerNameEx(marriedto); //Here is 92178 new married[20]; strmid(married, PlayerInfo[giveplayerid][pMarriedTo], 0, strlen(PlayerInfo[giveplayerid][pMarriedTo]), 255); if(PlayerInfo[pmarriedto][pSex] == 1) { sext = "Husband"; } else { sext = "Wife"; } //92181 if(giveplayerid != INVALID_PLAYER_ID) { format(string, sizeof(string), "Name : %s\n", GetPlayerNameEx(giveplayerid)); strcat(HistoryString, string, sizeof(HistoryString)); format(string, sizeof(string), "Crime : %s\n", PlayerCrime[giveplayerid][pAccusedof]); strcat(HistoryString, string, sizeof(HistoryString)); format(string, sizeof(string), "Claimant : %s\n", PlayerCrime[giveplayerid][pVictim]); strcat(HistoryString, string, sizeof(HistoryString)); format(string, sizeof(string), "Reported : %s\n", PlayerCrime[giveplayerid][pAccusing]); strcat(HistoryString, string, sizeof(HistoryString)); format(string, sizeof(string), "Accused : %s\n", PlayerCrime[giveplayerid][pBplayer]); strcat(HistoryString, string, sizeof(HistoryString)); format(string, sizeof(string), "Phone Number: : %d\n", PlayerInfo[giveplayerid][pPnumber]); strcat(HistoryString, string, sizeof(HistoryString)); format(string, sizeof(string), "House Address 1 : MDC Address Code - %d\n", PlayerInfo[giveplayerid][pPhousekey]); strcat(HistoryString, string, sizeof(HistoryString)); format(string, sizeof(string), "House Address 2 : MDC Address Code - %d\n", PlayerInfo[giveplayerid][pPhousekey2]); strcat(HistoryString, string, sizeof(HistoryString)); format(string, sizeof(string), "%s : %s\n", sext, married); strcat(HistoryString, string, sizeof(HistoryString)); if(PlayerInfo[giveplayerid][pProbationTime] != 0) { format(string, sizeof(string), "Probation : %d minutes left\n", PlayerInfo[giveplayerid][pProbationTime]); strcat(HistoryString, string, sizeof(HistoryString)); } for(new i=0; i<MAX_PLAYERVEHICLES; i++) { if(PlayerVehicleInfo[giveplayerid][i][pvTicket] != 0) { format(string, sizeof(string), "Vehicle registration: %d | Vehicle Name: %s | Ticket: $%d.\n",PlayerVehicleInfo[giveplayerid][i][pvId],GetVehicleName(PlayerVehicleInfo[giveplayerid][i][pvId]),PlayerVehicleInfo[giveplayerid][i][pvTicket]); strcat(HistoryString, string, sizeof(HistoryString)); } } new text1[20]; new text2[20]; new text3[20]; new text4[20]; if(PlayerInfo[giveplayerid][pCarLic] == 0) { text1 = "Not Passed"; } if(PlayerInfo[giveplayerid][pCarLic] == 1) { text1 = "Passed"; } if(PlayerInfo[giveplayerid][pCarLic] == 2) { text1 = "Suspended"; } if(PlayerInfo[giveplayerid][pCarLic] == 3) { text1 = "Cancelled"; } if(PlayerInfo[giveplayerid][pFlyLic]) { text4 = "Passed"; } else { text4 = "Not Passed"; } if(PlayerInfo[giveplayerid][pBoatLic]) { text2 = "Passed"; } else { text2 = "Not Passed"; } if(PlayerInfo[giveplayerid][pGunLic]) { text3 = "Passed"; } else { text3 = "Not Passed"; } format(string, sizeof(string), "-Drivers License: %s.\n", text1); strcat(HistoryString, string, sizeof(HistoryString)); format(string, sizeof(string), "-Flying License: %s.\n", text4); strcat(HistoryString, string, sizeof(HistoryString)); format(string, sizeof(string), "-Sailing License: %s.\n", text2); strcat(HistoryString, string, sizeof(HistoryString)); format(string, sizeof(string), "-Weapon License: %s.\n", text3); strcat(HistoryString, string, sizeof(HistoryString)); ShowPlayerDialog(playerid, FBI_CHECK_END, DIALOG_STYLE_LIST, "FBI-MDC | Criminal History", HistoryString, "OK", "Cancel"); format(string, sizeof(string), " DISPATCH: %s has run a check for warrants on %s ", GetPlayerNameEx(playerid), giveplayer); SendRadioMessage(1, COLOR_DBLUE, string); SendRadioMessage(2, COLOR_DBLUE, string); SendRadioMessage(3, COLOR_DBLUE, string); return 1; } else { ShowPlayerDialog(playerid, MDC_END_ID, DIALOG_STYLE_MSGBOX, "NY-MDC - Logged in | ERROR ", "There is no record of that person.", "OK", "Cancel"); return 1; } }
Код:
.pwn(92178) : error 035: argument type mismatch (argument 1) (92181) : error 033: array must be indexed (variable "pmarriedto") .pwn(92181) : error 006: must be assigned to an array .pwn(92181) : error 006: must be assigned to an array .pwn(92181) : fatal error 107: too many error messages on one line Compilation aborted.Pawn compiler 3.2.3664 Copyright (coffee) 1997-2006, ITB CompuPhase 5 Errors.