Jump to content
  • 0

help about mvp cards


Question

Posted (edited)

 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.

3 answers to this question

Recommended Posts

  • 0
Posted

@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);            
                        }
                    
                  //  }
  • 0
Posted

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] )

 

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.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...