27.02.2011, 08:27
I get lot of tag mismatch errors on these lines
Defines
Please help thnx
Код:
public ChangeStreamPickupModel(ID,newmodel) { if(Pickup[ID][pickupCreated]) { DestroyPickup(Pickup[ID][pickupID]); Pickup[ID][pickupVisible] = 0; Pickup[ID][pickupModel] = newmodel; return 1; } return 0; } public MoveStreamPickup(ID,Float:x,Float:y,Float:z) { if(Pickup[ID][pickupCreated]) { DestroyPickup(Pickup[ID][pickupID]); Pickup[ID][pickupVisible] = 0; Pickup[ID][pickupX] = x; Pickup[ID][pickupY] = y; Pickup[ID][pickupZ] = z; return 1; } return 0; } public CreateStreamPickup(model,type,Float:x,Float:y,Float:z,range) { new FoundID = 0; new ID; for ( new i = 0; FoundID <= 0 ; i++) { if( Pickup[i][pickupCreated] == 0 ) { if( FoundID == 0 ) { ID = i; FoundID = 1; } } if( i > MAX_S_PICKUPS ) { FoundID = 2; } } if( FoundID == 2 ) { print("[Error:] Pickup limit reached. Pickup not created"); return -1; } Pickup[ID][pickupCreated] = 1; Pickup[ID][pickupVisible] = 0; Pickup[ID][pickupModel] = model; Pickup[ID][pickupType] = type; Pickup[ID][pickupX] = x; Pickup[ID][pickupY] = y; Pickup[ID][pickupZ] = z; Pickup[ID][pickupRange] = range; return ID; }
Код:
enum pickupINFO { pickupCreated, pickupVisible, pickupID, pickupRange, Float:pickupX, Float:pickupY, Float:pickupZ, pickupType, pickupModel } new Pickup[MAX_S_PICKUPS+1][pickupINFO];