Hatake Kakashi Posted June 23, 2012 Group: Members Topic Count: 254 Topics Per Day: 0.05 Content Count: 825 Reputation: 3 Joined: 11/14/11 Last Seen: June 25, 2021 Share Posted June 23, 2012 how to fix this error? ========================================= - shop dyn_shop8 -1,50150 ========================================= ra_temsky,57,145,4 script Donation Armor Shop#8 966,{ mes Your Donation Coupon--[+countitem(.Cost)+]; close2; callshop dyn_shop+.a,1; npcshopattach dyn_shop+.a; end; OnInit set .a,strnpcinfo(2); ========================================= set .Cost,7179; ========================================= setarray .buy_id[0],2383,2344,2346,2348,2350,2367,2381,2377,2382,2378,2379,2376,2380; setarray .buy_co[0],20,6,6,6,6,6,6,12,12,12,12,12,12; ========================================= npcshopitem dyn_shop8,.buy_id[0],.buy_co[0]; for(set .ik,1;.ikgetarraysize(.buy_id);set .ik,.ik+1){ npcshopadditem dyn_shop+.a,.buy_id[.ik],.buy_co[.ik]; } end; OnBuyItem getinventorylist; if(@bought_quantity[@i] = 0){ goto OnEnrd; end; } for(set @i,0;@igetarraysize(@bought_nameid);set @i,@i+1){ KeyWorld set .@type, getiteminfo( @bought_nameid[.@i], 2 ); if ( .@type == 4 .@type == 5 .@type == 7 .@type == 8 ) set .@count, .@count + 1; else { for( set .@j,0; .@j@inventorylist_count; set .@j, .@j+1 ) if ( @inventorylist_id[.@i] == @bought_nameid[.@i] ) break; if ( .@j == @inventorylist_count ) set .@count, .@count+1 ; } for(set @i2,0;@i2getarraysize(.buy_id);set @i2,@i2+1){ if(@bought_nameid[@i]==.buy_id[@i2]){ set @gh,@gh+.buy_co[@i2]@bought_quantity[@i]; set @wh,@wh+getiteminfo(@bought_nameid[@i],6)@bought_quantity[@i]; } } } if ( .@count + @inventorylist_count 100 ) { announce [D-Shop] Can't hold more than 100 items.,bc_self; goto OnEnrd; } if(countitem(.Cost)@gh){ announce You do not have enough Reunited Donation Ticket.,bc_self; announce Contact ADMIN and try to donate.,bc_self; goto OnEnrd; end; }else{ if(@wh(MaxWeight-Weight)){ announce [D-Shop]Too heavy,bc_self; goto OnEnrd; end; }else{ delitem .Cost,@gh; for(set @i,0;@igetarraysize(@bought_nameid);set @i,@i+1){ getitem @bought_nameid[@i],@bought_quantity[@i]; } } } OnEnrd set @gh,0; set @wh,0; set @i,0; set @i2,0; deletearray @bought_quantity,getarraysize(@bought_quantity); deletearray @bought_nameid,getarraysize(@bought_nameid); end; } Quote Link to comment Share on other sites More sharing options...
Legacy Posted June 23, 2012 Group: Members Topic Count: 8 Topics Per Day: 0.00 Content Count: 21 Reputation: 0 Joined: 12/24/11 Last Seen: May 14, 2022 Share Posted June 23, 2012 //========================================= - shop dyn_shop8 -1,50150 //========================================= ra_temsky,57,145,4 script Donation Armor Shop#8 966,{ mes Your Donation Coupon--[+countitem(.Cost)+]; close2; callshop dyn_shop+.a,1; npcshopattach dyn_shop+.a; end; OnInit set .a,strnpcinfo(2); //========================================= set .Cost,7179; //========================================= setarray .buy_id[0],2383,2344,2346,2348,2350,2367,2381,2377,2382,2378,2379,2376,2380; setarray .buy_co[0],20,6,6,6,6,6,6,12,12,12,12,12,12; //========================================= npcshopitem dyn_shop8,.buy_id[0],.buy_co[0]; for(set .ik,1;.ikgetarraysize(.buy_id);set .ik,.ik+1){ npcshopadditem dyn_shop+.a,.buy_id[.ik],.buy_co[.ik]; } end; OnBuyItem getinventorylist; if(@bought_quantity[@i] = 0){ goto OnEnrd; end; } for(set @i,0;@igetarraysize(@bought_nameid);set @i,@i+1){ KeyWorld set .@type, getiteminfo( @bought_nameid[.@i], 2 ); if ( .@type == 4 .@type == 5 .@type == 7 .@type == 8 ) set .@count, .@count + 1; else { for( set .@j,0; .@j@inventorylist_count; set .@j, .@j+1 ) if ( @inventorylist_id[.@i] == @bought_nameid[.@i] ) break; if ( .@j == @inventorylist_count ) set .@count, .@count+1 ; } for(set @i2,0;@i2getarraysize(.buy_id);set @i2,@i2+1){ if(@bought_nameid[@i]==.buy_id[@i2]){ set @gh,@gh+.buy_co[@i2]@bought_quantity[@i]; set @wh,@wh+getiteminfo(@bought_nameid[@i],6)@bought_quantity[@i]; } } } if ( .@count + @inventorylist_count 100 ) { announce [D-Shop] Can't hold more than 100 items.,bc_self; goto OnEnrd; } if(countitem(.Cost)@gh){ announce You do not have enough Reunited Donation Ticket.,bc_self; announce Contact ADMIN and try to donate.,bc_self; goto OnEnrd; end; }else{ if(@wh(MaxWeight-Weight)){ announce [D-Shop]Too heavy,bc_self; goto OnEnrd; end; }else{ delitem .Cost,@gh; for(set @i,0;@igetarraysize(@bought_nameid);set @i,@i+1){ getitem @bought_nameid[@i],@bought_quantity[@i]; } } } OnEnrd set @gh,0; set @wh,0; set @i,0; set @i2,0; deletearray @bought_quantity,getarraysize(@bought_quantity); deletearray @bought_nameid,getarraysize(@bought_nameid); end; } try this Quote Link to comment Share on other sites More sharing options...
Bahmut Posted June 23, 2012 Group: Members Topic Count: 17 Topics Per Day: 0.00 Content Count: 382 Reputation: 39 Joined: 01/17/12 Last Seen: February 13, 2020 Share Posted June 23, 2012 You also forgot to use " when writing text: //========================================= - shop dyn_shop8 -1,50150 //========================================= ra_temsky,57,145,4 script Donation Armor Shop#8 966,{ mes "Your Donation Coupon--["+countitem(.Cost)+"]"; close2; callshop dyn_shop+.a,1; npcshopattach dyn_shop+.a; end; OnInit set .a,strnpcinfo(2); //========================================= set .Cost,7179; //========================================= setarray .buy_id[0],2383,2344,2346,2348,2350,2367,2381,2377,2382,2378,2379,2376,2380; setarray .buy_co[0],20,6,6,6,6,6,6,12,12,12,12,12,12; //========================================= npcshopitem dyn_shop8,.buy_id[0],.buy_co[0]; for(set .ik,1;.ikgetarraysize(.buy_id);set .ik,.ik+1){ npcshopadditem dyn_shop+.a,.buy_id[.ik],.buy_co[.ik]; } end; OnBuyItem getinventorylist; if(@bought_quantity[@i] = 0){ goto OnEnrd; end; } for(set @i,0;@igetarraysize(@bought_nameid);set @i,@i+1){ //KeyWorld set .@type, getiteminfo( @bought_nameid[.@i], 2 ); if ( .@type == 4 .@type == 5 .@type == 7 .@type == 8 ) set .@count, .@count + 1; else { for( set .@j,0; .@j@inventorylist_count; set .@j, .@j+1 ) if ( @inventorylist_id[.@i] == @bought_nameid[.@i] ) break; if ( .@j == @inventorylist_count ) set .@count, .@count+1 ; } for(set @i2,0;@i2getarraysize(.buy_id);set @i2,@i2+1){ if(@bought_nameid[@i]==.buy_id[@i2]){ set @gh,@gh+.buy_co[@i2]@bought_quantity[@i]; set @wh,@wh+getiteminfo(@bought_nameid[@i],6)@bought_quantity[@i]; } } } if ( .@count + @inventorylist_count 100 ) { announce "[D-Shop] Can't hold more than 100 items.",bc_self; goto OnEnrd; } if(countitem(.Cost)@gh){ announce "You do not have enough Reunited Donation Ticket.",bc_self; announce "Contact ADMIN and try to donate.",bc_self; goto OnEnrd; end; }else{ if(@wh(MaxWeight-Weight)){ announce "[D-Shop]Too heavy",bc_self; goto OnEnrd; end; }else{ delitem .Cost,@gh; for(set @i,0;@igetarraysize(@bought_nameid);set @i,@i+1){ getitem @bought_nameid[@i],@bought_quantity[@i]; } } } OnEnrd set @gh,0; set @wh,0; set @i,0; set @i2,0; deletearray @bought_quantity,getarraysize(@bought_quantity); deletearray @bought_nameid,getarraysize(@bought_nameid); end; } Quote Link to comment Share on other sites More sharing options...
Jezu Posted June 23, 2012 Group: Members Topic Count: 29 Topics Per Day: 0.01 Content Count: 566 Reputation: 34 Joined: 11/17/11 Last Seen: January 24 Share Posted June 23, 2012 (edited) @ @Hatake Kakashi You've removed the '//' (comment) on the llne ======================== just add // like this // ================================= Edited June 23, 2012 by Jezu Quote Link to comment Share on other sites More sharing options...
Bahmut Posted June 23, 2012 Group: Members Topic Count: 17 Topics Per Day: 0.00 Content Count: 382 Reputation: 39 Joined: 01/17/12 Last Seen: February 13, 2020 Share Posted June 23, 2012 @ @Hatake Kakashi You've removed the '//' (comment) on the llne ======================== just add // like this // ================================= Yeah but he also forgot to use " when writing text. His code: mes Your Donation Coupon--[+countitem(.Cost)+]; How it should be: mes "Your Donation Coupon--["+countitem(.Cost)+"]"; Quote Link to comment Share on other sites More sharing options...
Question
Hatake Kakashi
how to fix this error?
Link to comment
Share on other sites
4 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.