Jump to content
  • 0

help about mvp cards


joelolopez

Question


  • Group:  Members
  • Topic Count:  154
  • Topics Per Day:  0.03
  • Content Count:  493
  • Reputation:   46
  • Joined:  01/24/12
  • Last Seen:  

 i want to sell all mvp cards  price + 25000000..

i need to match up the .@id[.@index]  to all mvpcards inside the array, but its not working.. how to make this work      

                    setarray .NoMvp_ids[0],4001,4002;
                    for( set .@i,0; .@i<getarraysize(.NoMvp_ids); set .@i,.@i+1  ) {
                    
                        if(.@type == 6 && .@id[.@index] == .NoMvp_ids[.@i] )
                        {
                        .@total_cost = 0;
                        .@total_cost += ( (.@price_buy[.@index] ) + 25000000);        
                        }
                        else
                        {
                        .@total_cost = 0;
                        .@total_cost += ( (.@price_buy[.@index] ) + 1000000);            
                        }
                    
                    }
         

          

Edited by Emistry
Please use CODEBOX.
Link to comment
Share on other sites

3 answers to this question

Recommended Posts

  • 0

  • Group:  Forum Moderator
  • Topic Count:  93
  • Topics Per Day:  0.02
  • Content Count:  10015
  • Reputation:   2348
  • Joined:  10/28/11
  • Last Seen:  

.@total_cost += ( (.@price_buy[.@index] ) + 25000000);

change to

.@total_cost +=  25000000;

 

Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  154
  • Topics Per Day:  0.03
  • Content Count:  493
  • Reputation:   46
  • Joined:  01/24/12
  • Last Seen:  

@emistry price is working properly but the array is the problem,

when i put it like this its working, but i need to compare .@id[.@index] with a couple of mvp ids and i cant make it work

 

                    setarray .NoMvp_ids[0],4001,4002;
                   // for( set .@i,0; .@i<getarraysize(.NoMvp_ids); set .@i,.@i+1  ) {
                    
                        if(.@type == 6 && .@id[.@index] == 4001 )
                        {
                        .@total_cost = 0;
                        .@total_cost += ( (.@price_buy[.@index] ) + 25000000);        
                        }
                        else
                        {
                        .@total_cost = 0;
                        .@total_cost += ( (.@price_buy[.@index] ) + 1000000);            
                        }
                    
                  //  }
Link to comment
Share on other sites

  • 0

  • Group:  Forum Moderator
  • Topic Count:  93
  • Topics Per Day:  0.02
  • Content Count:  10015
  • Reputation:   2348
  • Joined:  10/28/11
  • Last Seen:  

you didnt add the checking condition for the mvp cards...

change

if(.@type == 6 && .@id[.@index] == 4001 )

change to

if(.@type == 6 && .@id[.@index] == .NoMvp_ids[0][.@i] )

 

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...