Jump to content
Search In
  • More options...
Find results that contain...
Find results in...

dragonlord52

Members
  • Posts

    63
  • Joined

  • Last visited

    Never

dragonlord52's Achievements

Newbie

Newbie (1/14)

0

Reputation

  1. This is the exact code I put in: Call AddPlayerInvStackableItem(Index, 4, 5) And yes, it is stackable
  2. I'm using Godlords inventory.ess and for some reason the AddPlayerInvStackableItem(Index, Item, Amount) is not actually adding anything to my inventory. I tell it to but it doesn't do anything.
  3. Figured out why, non-stackables come out as 0 in terms of value
  4. For some reason, even if I don't have items in my inventory, the script still by passes this if statement ``` 'CHECK FOR REQUIRED ITEMS If (CountPlayerInvItem(Index, 1) < 0) Then Call PlayerMsg(Index, "1", 14) If (Req_Items = 2) Then If (CountPlayerInvItem(Index, Req_2_Num) = Req_2_Val) Then has_items = 1 End If Else has_items = 1 End If Else Call PlayerMsg(Index, "0", 14) has_items = 0 End If ``` This is the CountPlayerInvItem thing from Goddie ``` ''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''' ' Function: CountPlayerInvItem ' ' Brief: counts an item in the inventory. ' ' Parameters: ' ' Index: the index number of the player. ' ' Item: the item to count. ' ''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''' Function CountPlayerInvItem(Index, Item) For Slot = 1 To MAX_INVSLOTS If GetPlayerInvItemNum(Index, Slot) = Item Then If GetPlayerInvItemValue(Index, Slot) = 0 Then Amount = Amount + 1 Else Amount = Amount + GetPlayerInvItemValue(Index, Slot) End If End If Next CountPlayerInvItem = Amount End Function ``` I'm not really sure how its happening and when I use PlayerMsg to help me debug it appears to just be a blank message. Any ideas?
  5. After looking through various quest scripts on the forums I have come up with this solution that DOES work. ``` Sub Quest(Index) On Error Resume Next NPC_Name = GetVar("Maps\map" & GetPlayerMap(Index) & ".ini", "QUEST", "NPC_Name") If (NPC_Name "" ) Then Quest_Status = GetVar("Accounts\" & GetPlayerLogin(Index) & "\" & GetPlayerName(Index) & ".ini", "QUEST", GetPlayerMap(Index)) If (Quest_Status < 0) Then Call PutVar("Accounts\" & GetPlayerLogin(Index) & "\" & GetPlayerName(Index) & ".ini", "QUEST", GetPlayerMap(Index), 1) End If Select Case Quest_Status Case 1 Exit Sub Case 2 Exit Sub Case 3 Exit Sub Case 4 Exit Sub End Select Else Call PlayerMsg(Index, "Fat Man Inc. Scripts:", 14) Call PlayerMsg(Index, "A Configuration File has been created in", 14) Call PlayerMsg(Index, "scripts\mapextras\" & GetPlayerMap(Index) & ".ini", 14) Call PutVar("Maps\map" & GetPlayerMap(Index) & ".ini", "QUEST", "Quest_Name", "Test Quest Name") Call PutVar("Maps\map" & GetPlayerMap(Index) & ".ini", "QUEST", "NPC_Name", "Test Name") Call PutVar("Maps\map" & GetPlayerMap(Index) & ".ini", "QUEST", "Start__Quest_Message", "You started a quest.") Call PutVar("Maps\map" & GetPlayerMap(Index) & ".ini", "QUEST", "During_Quest_Message", "You are on a quest.") Call PutVar("Maps\map" & GetPlayerMap(Index) & ".ini", "QUEST", "Complete_Quest_Message", "You have completed a quest.") Call PutVar("Maps\map" & GetPlayerMap(Index) & ".ini", "QUEST", "After_Done_Quest_Message", "You already did this quest.") Call PutVar("Maps\map" & GetPlayerMap(Index) & ".ini", "QUEST", "Amount_of_Items_Needed", 1) Call PutVar("Maps\map" & GetPlayerMap(Index) & ".ini", "QUEST", "Item_1_Number", 1) Call PutVar("Maps\map" & GetPlayerMap(Index) & ".ini", "QUEST", "Item_1_Value", 1) Call PutVar("Maps\map" & GetPlayerMap(Index) & ".ini", "QUEST", "Item_2_Number", 0) Call PutVar("Maps\map" & GetPlayerMap(Index) & ".ini", "QUEST", "Item_2_Value", 0) Call PutVar("Maps\map" & GetPlayerMap(Index) & ".ini", "QUEST", "Repeatable", 0) Call PutVar("Maps\map" & GetPlayerMap(Index) & ".ini", "QUEST", "Sound_On", 0) Call PutVar("Maps\map" & GetPlayerMap(Index) & ".ini", "QUEST", "Sound_File", "critical.wav") End If End Sub ```
  6. Now I get this error: TYPE: Type mismatch: 'Quest_Status' LINE: 5 COLUMN: 0 CODE:
  7. Ugh, now it give me the error TYPE: Type mismatch: 'CInt' LINE: 5 COLUMN: 0 CODE:
  8. I still get an end of statement error Line 2 Column 17
  9. I tried what you just posted and it gives me an end of statement expected error. Anyway, here is the entire code I have, got this far before it started erroring. ``` Sub Quest(Index) Dim Quest_Status = CStr(0) NPC_Name = GetVar("Maps\map" & GetPlayerMap(Index) & ".ini", "QUEST", "NPC_Name") If (NPC_Name "" ) Then Quest_Status = CStr(GetVar("Accounts\" & GetPlayerLogin(Index) & "\" & GetPlayerName(Index) & ".ini", "QUEST", GetPlayerMap(Index))) Select Case Quest_Status Case 1 Exit Sub Case 2 Exit Sub Case 3 Exit Sub Case 4 Exit Sub End Select Else Call PlayerMsg(Index, "Fat Man Inc. Scripts:", 14) Call PlayerMsg(Index, "A Configuration File has been created in", 14) Call PlayerMsg(Index, "scripts\mapextras\" & GetPlayerMap(Index) & ".ini", 14) Call PutVar("Maps\map" & GetPlayerMap(Index) & ".ini", "QUEST", "Quest_Name", "Test Quest Name") Call PutVar("Maps\map" & GetPlayerMap(Index) & ".ini", "QUEST", "NPC_Name", "Test Name") Call PutVar("Maps\map" & GetPlayerMap(Index) & ".ini", "QUEST", "Start__Quest_Message", "You started a quest.") Call PutVar("Maps\map" & GetPlayerMap(Index) & ".ini", "QUEST", "During_Quest_Message", "You are on a quest.") Call PutVar("Maps\map" & GetPlayerMap(Index) & ".ini", "QUEST", "Complete_Quest_Message", "You have completed a quest.") Call PutVar("Maps\map" & GetPlayerMap(Index) & ".ini", "QUEST", "After_Done_Quest_Message", "You already did this quest.") Call PutVar("Maps\map" & GetPlayerMap(Index) & ".ini", "QUEST", "Amount_of_Items_Needed", 1) Call PutVar("Maps\map" & GetPlayerMap(Index) & ".ini", "QUEST", "Item_1_Number", 1) Call PutVar("Maps\map" & GetPlayerMap(Index) & ".ini", "QUEST", "Item_1_Value", 1) Call PutVar("Maps\map" & GetPlayerMap(Index) & ".ini", "QUEST", "Item_2_Number", 0) Call PutVar("Maps\map" & GetPlayerMap(Index) & ".ini", "QUEST", "Item_2_Value", 0) Call PutVar("Maps\map" & GetPlayerMap(Index) & ".ini", "QUEST", "Repeatable", 0) Call PutVar("Maps\map" & GetPlayerMap(Index) & ".ini", "QUEST", "Sound_On", 0) Call PutVar("Maps\map" & GetPlayerMap(Index) & ".ini", "QUEST", "Sound_File", "critical.wav") End If End Sub ```
  10. I still get the same error. Oh and I deleted the If statement as well (not commented out) but when I put the deceleration for the variable Quest_Status I get that error, dunno why that is. The () on my If statements do work, I use it on all of my scripts. I guess its habit from taking my C++ class.
  11. I use it for this ``` If (Quest_Status "") Then ``` But it gives that error in general. I have another one just like it but going to a different area and it works fine which is why I am confused. ~-EDIT-~ I tried what you posted and I get the exact same error.
  12. I don't know if this is an ES only error or if its also in EE 2.7 but does anyone know why it does this? This is the line that errors out ``` Quest_Status = GetVar("Accounts\" & GetPlayerLogin(Index) & "\" & GetPlayerName(Index) & ".ini", "QUEST", GetPlayerMap(Index)) ``` There is as follows: TYPE: Type mismatch: '[string:""]' LINE: 9 COLUMN: 0 CODE: I had tried dimming it and I have looked over this code again and again. If I comment the line out the script works just fine but if I try to put it back in it errors on me. Any ideas? Thanks, Slash ~-EDIT-~ If something exists in that spot it doesn't error but if nothing is there it errors. You'll need that information to replicate it.
  13. How do you download this? I downloaded tutoriseSVN but now what?
×
×
  • Create New...