23.10.2009, 19:33
Код:
enum VehInfo { Name[24], Model, C1, C2, Locked, Float:vehix, Float:vehiy, Float:vehiz, }
Код:
new VInfo[MAX_VEH][VehInfo];
Код:
AddVeh(vehiid, modelid, Float:vehiX, Float:vehiY, Float:vehiZ, color1, color2) { new vehi[256]; format(vehi, sizeof(vehi), "Vehicles/vehiid%d",vehiid); if(dini_Exists(vehi)) { if(dini_Int(vehi, "Model")==0) { dini_IntSet(vehi, "Model", modelid); VInfo[vehiid][Model] = modelid; VInfo[vehiid][vehix] = vehiX; VInfo[vehiid][vehiy] = vehiY; VInfo[vehiid][vehiz] = vehiZ; dini_FloatSet(vehi, "vehix", vehiX); dini_FloatSet(vehi, "vehiy", vehiY); dini_FloatSet(vehi, "vehiz", vehiZ); VInfo[vehiid][C1] = color1; VInfo[vehiid][C2] = color2; dini_IntSet(vehi, "C1", color1); dini_IntSet(vehi, "C2", color2); VInfo[vehiid] = CreateVehicle(VInfo[vehiid][Model], vehiX, vehiY, vehiZ, 0.0, color1, color2); print("-"); print("--------------Vehicle Created--------------"); printf("- Modelid: %d", modelid); printf("- Color 1: %d", color1); printf("- Color 2: %d", color2); print("---------------------------------------"); print("-"); } else { VInfo[vehiid][Model] = dini_Int(vehi, "Model"); } VInfo[vehiid][vehix] = dini_Int(vehi, "vehix"); VInfo[vehiid][vehiy] = dini_Int(vehi, "vehiy"); VInfo[vehiid][vehiz] = dini_Int(vehi, "vehiz"); VInfo[vehiid][C1] = dini_Int(vehi, "C1"); VInfo[vehiid][C2] = dini_Int(vehi, "C2"); VInfo[vehiid] = CreateVehicle(VInfo[vehiid][Model], vehiX, vehiY, vehiZ, 0.0, color1, color2); } }
And I get these errors/warnings:
Код:
C:\DOCUME~1\Jermaine\MYDOCU~1\OUTRAG~1\GAMEMO~1\ORP.pwn(4876) : warning 202: number of arguments does not match definition C:\DOCUME~1\Jermaine\MYDOCU~1\OUTRAG~1\GAMEMO~1\ORP.pwn(4876) : error 033: array must be indexed (variable "VInfo") C:\DOCUME~1\Jermaine\MYDOCU~1\OUTRAG~1\GAMEMO~1\ORP.pwn(4894) : warning 202: number of arguments does not match definition C:\DOCUME~1\Jermaine\MYDOCU~1\OUTRAG~1\GAMEMO~1\ORP.pwn(4894) : error 033: array must be indexed (variable "VInfo")