View Single Post
  #1  
Old 09-07-2006, 03:20 AM
Yen Yen is offline
Banned
Yen's Avatar
Join Date: Oct 2005
Location: Nova Scotia, Canada
Posts: 1,085
Yen is an unknown quantity at this point
Send a message via AIM to Yen Send a message via MSN to Yen
String being added twice

The 'exp' portion of the code is adding the string twice..

PHP Code:
function CompleteQuest(acc) {
  
temp.reference findplayer(acc);
  for (
temp.0temp.this.questinfo.reward.size(); temp.a++) {
    if (
this.questinfo.reward[temp.a] == "gold") {
      
temp.reference.rupees += this.questinfo.reward[temp.a+1];
      
temp.reference.client.temp_addmessages.add("You gain" SPC this.questinfo.reward[temp.a+1SPC "gold.");
    }
    else if (
this.questinfo.reward[temp.a] == "item") {
      
temp.ivars.loadvars("levels/archetype/" this.questinfo.reward[temp.a+1] @ ".arc");
      
temp.reference.AddItem(temp.ivars.wname,this.questinfo.reward[temp.a+1],this.questinfo.reward[temp.a+2]);
      
temp.reference.client.temp_addmessages.add("You gain" SPC temp.ivars.wname SPC "x" this.questinfo.reward[temp.a+2] @ ".");
    }
    else if (
this.questinfo.reward[temp.a] == "exp") {
      
temp.reference.client.temp_addmessages.add("You gain" SPC this.questinfo.reward[temp.a+1SPC "EXP.");
      
temp.reference.AddEXP(this.questinfo.reward[temp.a+1]);
    }
  }

Reply With Quote