5017 coding questions (:

05/05/2013 06:28 Wuscheli#16
Quote:
Originally Posted by Dr.unreal View Post
Its a pseudo code . You need to actually use functions from your source .
I don't understand, sorry. I'm new to this..
05/05/2013 07:54 U2_Caparzo#17
Quote:
Originally Posted by Dr.unreal View Post
How is it uneccesary if they can have only one of those 3?
the for loop is doing

if(MyChar.Inventory.Contains(722000))
remove....
else if(MyCha......Contains(722001))
remove....
else if(MyChar.....Contains(722002))
remove....

u are doing 2-6 comparations when u need just 1-3
05/05/2013 10:42 Smaehtin#18
You should probably read some programming tutorials if you don't even understand the most basic things of it.
05/05/2013 16:11 Dr.unreal#19
Quote:
Originally Posted by U2_Caparzo View Post
the for loop is doing

if(MyChar.Inventory.Contains(722000))
remove....
else if(MyCha......Contains(722001))
remove....
else if(MyChar.....Contains(722002))
remove....

u are doing 2-6 comparations when u need just 1-3
If(Player has any of the three items)
Iterate throught 722000-722000 (we dont know which of the three he has at this point
If(Player has item od given ID -> remove it and break the loop)
Are you sure you are not just interpreting the code wrong ?

And Wuscheli This is pseudocode . Simply said , since we dont know what source you are using , we dont know whats the name of the required functions thus in the sample code the name i simply used plain english for naming (For example HasItem() is == to the InventoryContains() in your source .
05/05/2013 16:42 Wuscheli#20
I use PazeCo Source & still not able to fix it =O
05/05/2013 17:11 Dr.unreal#21
Well then try to get down the basics first then :)
05/05/2013 17:22 Wuscheli#22
ye but HOW to learn CO basics?xD
05/05/2013 17:34 Dr.unreal#23
Its not CO ServerProgramming basics we are talking about here . You need to learn actual basics of programming in c# lol . Just go throught some tutorials online and try to do things yourself afterwards . You ll learn rather fast when you try to experiment on your own .
05/08/2013 01:39 Wuscheli#24
Hmm doesn't matter. I just figured it out how to remove all item and silver drops..
I like the way to learn something, sometimes it is hard but.. learning by doing^^