joelolopez Posted December 11, 2016 Group: Members Topic Count: 154 Topics Per Day: 0.03 Content Count: 493 Reputation: 46 Joined: 01/24/12 Last Seen: August 25, 2022 Share Posted December 11, 2016 (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 December 11, 2016 by Emistry Please use CODEBOX. Quote Link to comment Share on other sites More sharing options...
0 Emistry Posted December 11, 2016 Group: Forum Moderator Topic Count: 93 Topics Per Day: 0.02 Content Count: 10018 Reputation: 2370 Joined: 10/28/11 Last Seen: 2 hours ago Share Posted December 11, 2016 .@total_cost += ( (.@price_buy[.@index] ) + 25000000); change to .@total_cost += 25000000; Quote Link to comment Share on other sites More sharing options...
0 joelolopez Posted December 11, 2016 Group: Members Topic Count: 154 Topics Per Day: 0.03 Content Count: 493 Reputation: 46 Joined: 01/24/12 Last Seen: August 25, 2022 Author Share Posted December 11, 2016 @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); } // } Quote Link to comment Share on other sites More sharing options...
0 Emistry Posted December 11, 2016 Group: Forum Moderator Topic Count: 93 Topics Per Day: 0.02 Content Count: 10018 Reputation: 2370 Joined: 10/28/11 Last Seen: 2 hours ago Share Posted December 11, 2016 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] ) Quote Link to comment Share on other sites More sharing options...
Question
joelolopez
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); } }
Please use CODEBOX.
Link to comment
Share on other sites
3 answers to this question
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.