Bump again.
Any progress?
Any progress?
int_t PBEM_CanSendProposal; int_t PBM_Sender[]; int_t PBEM_receiver[]; int_t PBM_Proposal[]; int_t PBEM_HasBeenSent[]; int_f StoreProposalType(int_t sender, int_t receiver, int_t ProposalType) { int_t i; int_t sucess; i = 0; while(i < PBEM_HasBeenSent.# && sucess == 0){ if(PBEM_HasBeenSent[i] == 1) { PBM_Sender[i] = sender; PBEM_receiver[i] = receiver; PBM_Proposal[i] = ProposalType; PBEM_HasBeenSent[i] = 0; } i = i + 1; } if(sucess == 0) { i = PBEM_HasBeenSent.#; PBM_Sender[i] = sender; PBEM_receiver[i] = receiver; PBM_Proposal[i] = ProposalType; PBEM_HasBeenSent[i] = 0; } } HandleEvent(NewProposal) 'SaveProposalToPBEM' pre { int_t ProposalType; //initial proposal if(PBEM_CanSendProposal == 0) { ProposalType = GetLastNewProposalType(player[0], player[1], 0); StoreProposalType(player[0], player[1], ProposalType, 0); return STOP; } else{ PBEM_CanSendProposal = 0; } } HandleEvent(BeginTurn) 'SendStoragedProposal' post { int_t i; for(i = 0; i < PBEM_HasBeenSent.#; i = i + 1) { if(player[0] == PBEM_receiver[i] && PBEM_HasBeenSent[i] == 0) { PBEM_CanSendProposal = 1; ConsiderNewProposal(PBM_Sender[i], PBEM_receiver[i], 2000, PBM_Proposal[i],0,ID_NONE,ID_NONE,ID_NONE); Event: NewProposal(PBM_Sender[i], PBEM_receiver[i]); PBEM_HasBeenSent[i] = 1; } } }
Comment