02.12.2013, 14:10
(
Последний раз редактировалось BarFix; 03.12.2013 в 10:53.
)
Hello everybody, thank you for helping!
I have a problem
The code of the command(That lines):
How can i fix it?
If you need it:
I have a problem
Quote:
C:\Users\Iska\Desktop\New folder (2)\LYL11.pwn(4004) : error 017: undefined symbol "ini_GetKey" C:\Users\Iska\Desktop\New folder (2)\LYL11.pwn(4004) : error 033: array must be indexed (variable "key") C:\Users\Iska\Desktop\New folder (2)\LYL11.pwn(4006) : error 017: undefined symbol "Ini_Value" C:\Users\Iska\Desktop\New folder (2)\LYL11.pwn(4006) : error 033: array must be indexed (variable "val") C:\Users\Iska\Desktop\New folder (2)\LYL11.pwn(400 : error 017: undefined symbol "Ini_Value" C:\Users\Iska\Desktop\New folder (2)\LYL11.pwn(400 : error 033: array must be indexed (variable "val") C:\Users\Iska\Desktop\New folder (2)\LYL11.pwn(4010) : error 017: undefined symbol "Ini_Value" C:\Users\Iska\Desktop\New folder (2)\LYL11.pwn(4010) : error 033: array must be indexed (variable "val") C:\Users\Iska\Desktop\New folder (2)\LYL11.pwn(4012) : error 017: undefined symbol "Ini_Value" C:\Users\Iska\Desktop\New folder (2)\LYL11.pwn(4012) : error 033: array must be indexed (variable "val") C:\Users\Iska\Desktop\New folder (2)\LYL11.pwn(4014) : error 017: undefined symbol "Ini_Value" C:\Users\Iska\Desktop\New folder (2)\LYL11.pwn(4014) : error 033: array must be indexed (variable "val") C:\Users\Iska\Desktop\New folder (2)\LYL11.pwn(4016) : error 017: undefined symbol "Ini_Value" C:\Users\Iska\Desktop\New folder (2)\LYL11.pwn(4016) : error 033: array must be indexed (variable "val") C:\Users\Iska\Desktop\New folder (2)\LYL11.pwn(401 : error 017: undefined symbol "Ini_Value" C:\Users\Iska\Desktop\New folder (2)\LYL11.pwn(401 : error 033: array must be indexed (variable "val") C:\Users\Iska\Desktop\New folder (2)\LYL11.pwn(4020) : error 017: undefined symbol "Ini_Value" C:\Users\Iska\Desktop\New folder (2)\LYL11.pwn(4020) : error 033: array must be indexed (variable "val") C:\Users\Iska\Desktop\New folder (2)\LYL11.pwn(4022) : error 017: undefined symbol "Ini_Value" C:\Users\Iska\Desktop\New folder (2)\LYL11.pwn(4022) : error 033: array must be indexed (variable "val") C:\Users\Iska\Desktop\New folder (2)\LYL11.pwn(4024) : error 017: undefined symbol "Ini_Value" C:\Users\Iska\Desktop\New folder (2)\LYL11.pwn(4024) : error 033: array must be indexed (variable "val") C:\Users\Iska\Desktop\New folder (2)\LYL11.pwn(4026) : error 017: undefined symbol "Ini_Value" C:\Users\Iska\Desktop\New folder (2)\LYL11.pwn(4026) : error 033: array must be indexed (variable "val") C:\Users\Iska\Desktop\New folder (2)\LYL11.pwn(4030) : error 017: undefined symbol "Ini_Value" C:\Users\Iska\Desktop\New folder (2)\LYL11.pwn(4030) : error 033: array must be indexed (variable "val") |
Quote:
stock LoadFamiliesHQ() { new string2[64]; format(string2, sizeof(string2), "familieshq.ini"); new File: GangFile = fopen(string2, io_read); //printf("[DEBUG] LoadFamiliesHQ: string2 (%s)", string2); if(GangFile) { //print("[DEBUG] LoadFamiliesHQ: GangFile exists, the handle parsed."); new key[ 256 ] , val[ 256 ]; new Data[ 256 ]; //print("[DEBUG] Starting while (fread(GangFile , Data , sizeof(Data)))"); while (fread(GangFile , Data , sizeof(Data))) { new string[128]; for(new f = 0; f < MAX_FAMILY; f++) { key = ini_GetKey(Data); format(string, 128, "Family%dEntranceX",f); if(strcmp(key , string , true) == 0) { val = Ini_Value(Data); FamilyInfo[f][FamilyEntrance][0] = floatstr(val); } format(string, 128, "Family%dEntranceY",f); if(strcmp(key , string , true) == 0) { val = Ini_Value(Data); FamilyInfo[f][FamilyEntrance][1] = floatstr(val); } format(string, 128, "Family%dEntranceZ",f); if(strcmp(key , string , true) == 0) { val = Ini_Value(Data); FamilyInfo[f][FamilyEntrance][2] = floatstr(val); } format(string, 128, "Family%dEntranceA",f); if(strcmp(key , string , true) == 0) { val = Ini_Value(Data); FamilyInfo[f][FamilyEntrance][3] = floatstr(val); } format(string, 128, "Family%dExitX",f); if(strcmp(key , string , true) == 0) { val = Ini_Value(Data); FamilyInfo[f][FamilyExit][0] = floatstr(val); } format(string, 128, "Family%dExitY",f); if(strcmp(key , string , true) == 0) { val = Ini_Value(Data); FamilyInfo[f][FamilyExit][1] = floatstr(val); } format(string, 128, "Family%dExitZ",f); if(strcmp(key , string , true) == 0) { val = Ini_Value(Data); FamilyInfo[f][FamilyExit][2] = floatstr(val); } format(string, 128, "Family%dExitA",f); if(strcmp(key , string , true) == 0) { val = Ini_Value(Data); FamilyInfo[f][FamilyExit][3] = floatstr(val); } format(string, 128, "Family%dInterior",f); if(strcmp(key , string , true) == 0) { val = Ini_Value(Data); FamilyInfo[f][FamilyInterior] = strval(val); } format(string, 128, "Family%dCustomMap",f); if(strcmp(key , string , true) == 0) { val = Ini_Value(Data); FamilyInfo[f][FamilyCustomMap] = strval(val); } format(string, 128, "Family%dVirtualWorld",f); if(strcmp(key , string , true) == 0) { val = Ini_Value(Data); FamilyInfo[f][FamilyVirtualWorld] = strval(val); } for(new fv = 0; fv < MAX_GANG_VEHICLES; fv++) { format(string, 128, "Family%dVeh%dModelId",f, fv); if(strcmp(key , string , true) == 0) { val = Ini_Value(Data); FamilyVehicleInfo[f][fv][fvModelId] = strval(val); } format(string, 128, "Family%dVeh%dSpawnx",f, fv); if(strcmp(key , string , true) == 0) { val = Ini_Value(Data); FamilyVehicleInfo[f][fv][fvSpawnx] = floatstr(val); } format(string, 128, "Family%dVeh%dSpawny",f, fv); if(strcmp(key , string , true) == 0) { val = Ini_Value(Data); FamilyVehicleInfo[f][fv][fvSpawny] = floatstr(val); } format(string, 128, "Family%dVeh%dSpawnz",f, fv); if(strcmp(key , string , true) == 0) { val = Ini_Value(Data); FamilyVehicleInfo[f][fv][fvSpawnz] = floatstr(val); } format(string, 128, "Family%dVeh%dSpawna",f, fv); if(strcmp(key , string , true) == 0) { val = Ini_Value(Data); FamilyVehicleInfo[f][fv][fvSpawna] = floatstr(val); } format(string, 128, "Family%dVeh%dLock",f, fv); if(strcmp(key , string , true) == 0) { val = Ini_Value(Data); FamilyVehicleInfo[f][fv][fvLock] = strval(val); } format(string, 128, "Family%dVeh%dLocked",f, fv); if(strcmp(key , string , true) == 0) { val = Ini_Value(Data); FamilyVehicleInfo[f][fv][fvLocked] = strval(val); } format(string, 128, "Family%dVeh%dPaintJob",f, fv); if(strcmp(key , string , true) == 0) { val = Ini_Value(Data); FamilyVehicleInfo[f][fv][fvPaintJob] = strval(val); } format(string, 128, "Family%dVeh%dColor1",f, fv); if(strcmp(key , string , true) == 0) { val = Ini_Value(Data); FamilyVehicleInfo[f][fv][fvColor1] = strval(val); } format(string, 128, "Family%dVeh%dColor2",f, fv); if(strcmp(key , string , true) == 0) { val = Ini_Value(Data); FamilyVehicleInfo[f][fv][fvColor2] = strval(val); } format(string, 128, "Family%dVeh%dFuel",f, fv); if(strcmp(key , string , true) == 0) { val = Ini_Value(Data); FamilyVehicleInfo[f][fv][fvFuel] = floatstr(val); } } //printf("Family %d loaded [DEBUG] FamilyEntranceX: %.1f FamilyEntranceY: %.1f FamilyEntranceZ: %.1f", f, FamilyInfo[f][FamilyEntrance][0], FamilyInfo[f][FamilyEntrance][1], FamilyInfo[f][FamilyEntrance][2]); } } fclose(GangFile); } return 1; } |
If you need it:
Quote:
stock ini_GetKey(line[]) { new keyRes[64]; keyRes[0] = 0; if(strfind(line , "=" , true) == -1) return keyRes; strmid(keyRes , line , 0 , strfind(line , "=" , true) , sizeof(keyRes)); return keyRes; } stock Ini_Value(line[]) { new valRes[156]; valRes[0]=0; if(strfind(line , "=" , true) == -1) return valRes; strmid(valRes , line , strfind(line , "=" , true)+1 , strlen(line) , sizeof(valRes)); return valRes; } |