Menu

Show posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.

Show posts Menu

Topics - Stranga

#60
Hello everyone,

I'm trying to simplify my code rather than using if and else statements and wish to convert it all to switch statements

For example:
Code: ags
 switch(player.HasInventory(item.ID))
 {
  case 1: do this; break;
  case 2: do that; break;
  default: yadda yadda; break;
 }

P.S I know this doesn't work as I'm trying to find a way to extract the item's ID and use it here but I keep running into a problem of cannot convert an ini into an inventory item.

Any help will be greatly appreciated :)
SMF spam blocked by CleanTalk