| Mirage Source http://miragesource.net/forums/ |
|
| Code Error http://miragesource.net/forums/viewtopic.php?f=201&t=4994 |
Page 1 of 1 |
| Author: | timster0 [ Wed Jan 21, 2009 11:44 pm ] |
| Post subject: | Code Error |
I'm getting "Case without Select Case" (the bolded case is what its highlighting) Code: ' Check to see if its any sort of ArmorSlot/WeaponSlot Select Case Item(GetPlayerInvItemNum(index, InvNum)).Type Case ITEM_TYPE_ARMOR If InvNum = GetPlayerEquipmentSlot(index, Armor) Then Call SetPlayerEquipmentSlot(index, 0, Armor) Call SendWornEquipment(index) End If MapItem(GetPlayerMap(index), i).Dur = GetPlayerInvItemDur(index, InvNum) Case ITEM_TYPE_WEAPON If Item(GetPlayerInvItemNum(index, InvNum)).TwoHanded < 1 Then If InvNum = GetPlayerEquipmentSlot(index, Weapon) Then Call SetPlayerEquipmentSlot(index, 0, Weapon) Call SendWornEquipment(index) End If MapItem(GetPlayerMap(index), i).Dur = GetPlayerInvItemDur(index, InvNum) If InvNum = GetPlayerEquipmentSlot(index, Weapon) Then Call SetPlayerEquipmentSlot(index, 0, Weapon) Call SendWornEquipment(index) End If MapItem(GetPlayerMap(index), i).Dur = GetPlayerInvItemDur(index, InvNum) [b]Case[/b] ITEM_TYPE_HELMET If InvNum = GetPlayerEquipmentSlot(index, Helmet) Then Call SetPlayerEquipmentSlot(index, 0, Helmet) Call SendWornEquipment(index) End If MapItem(GetPlayerMap(index), i).Dur = GetPlayerInvItemDur(index, InvNum) Case ITEM_TYPE_SHIELD If InvNum = GetPlayerEquipmentSlot(index, Shield) Then Call SetPlayerEquipmentSlot(index, 0, Shield) Call SendWornEquipment(index) End If MapItem(GetPlayerMap(index), i).Dur = GetPlayerInvItemDur(index, InvNum) End Select Any fix? |
|
| Author: | Nean [ Thu Jan 22, 2009 1:02 am ] |
| Post subject: | Re: Code Error |
You have too many Code: End If 's
|
|
| Author: | Anthony [ Thu Jan 22, 2009 1:15 am ] |
| Post subject: | Re: Code Error |
No, he is missing an End if. Code: Case ITEM_TYPE_WEAPON
If Item(GetPlayerInvItemNum(index, InvNum)).TwoHanded < 1 Then If InvNum = GetPlayerEquipmentSlot(index, Weapon) Then Call SetPlayerEquipmentSlot(index, 0, Weapon) Call SendWornEquipment(index) End If MapItem(GetPlayerMap(index), i).Dur = GetPlayerInvItemDur(index, InvNum) If InvNum = GetPlayerEquipmentSlot(index, Weapon) Then Call SetPlayerEquipmentSlot(index, 0, Weapon) Call SendWornEquipment(index) End If MapItem(GetPlayerMap(index), i).Dur = GetPlayerInvItemDur(index, InvNum) |
|
| Author: | timster0 [ Thu Jan 22, 2009 1:24 am ] |
| Post subject: | Re: Code Error |
Works now, thanks. |
|
| Page 1 of 1 | All times are UTC |
| Powered by phpBB® Forum Software © phpBB Group https://www.phpbb.com/ |
|