Dimitrisgb Posted January 16, 2021 Author Share Posted January 16, 2021 To be more specific, I am trying to fix some bugs in an alreay existing result script. I want to change the name of the NPC that is there to the correct name the NPC has. For example, I have wrongly written Ahdrisa, while the name is Adhrisa (d before h). When I change it it says that 'rent' is an unknown variable, which apparentlly wasn't when I first created it. So, what has changed and the 'rent' is an unknown variable. Link to comment Share on other sites More sharing options...
Pellape Posted January 16, 2021 Share Posted January 16, 2021 (edited) Oki. Click the code button [<>] in a message and iclude your code and we solve it for sure... Like this: scn Myscript short variable float anothervariable Begin GameMode End Then it will get easy to read but if I will make a guess, you deleted your initiation of rent and I giess it is a short? scn YourScript short rent Every variable you use must be initiated or rather declared Edited January 16, 2021 by Pellape Link to comment Share on other sites More sharing options...
Dimitrisgb Posted January 16, 2021 Author Share Posted January 16, 2021 player.removeitemgold001 10BedTapestry.disableset VALAdhrisa.rent to 1 I want to delete the phrase "Bed Tapestry.disable" and change the name Ahdrisa to Adhrisa. Link to comment Share on other sites More sharing options...
Pellape Posted January 16, 2021 Share Posted January 16, 2021 (edited) Start with renaming Ahdrisa to Adhrisa and also the NPC Reference VALAhdrisa to VALAdhrisa or is that the NPC base Object name? If it is the Base Object Name then I strongly suggest you call that NPC Persistent Reference to VALAdhrisaREF Open that NPC's script to see if the variable is declared and I am 99.98% sure it is a short and if it is missing, then add it. Scn VALAdhrisaSCR short rent Begin GameMode When calling a script from somewhere else, you do not call the Base Object as you call the reference and it must be Persistent. One Object can be placed in game several times and it is only one of all those objects you can make changes to so therefor you cannot call a script by using its base object ID. To make a Persistent reference, well give the reference a proper names and check the Persistent Reference check box. If you are calling a variable within the same script, you do not need to call the reference that runs the script like: player.removeitemgold001 10 set rent to 1 Or how do you execute the script as it should be in the conversation with that innkeeper. To be very sure I do not mix up Base Objects, references, scrips, quests, spells and so on I always use special ending at their names and I can make an example of x: Object x has ID Pekx which all my ID starts with -> PekIf it is aspell -> PekxSPLPersistent Reference -> PekxREFquest -> PekxQSTScript -> PekxSCRQuest Script -> PekxQSTSCRSpell Script -> PekxSPLSCRLevel List -> PekxLLIf you end your stuff that way, then you will always know what it is or was meant to be. :wink: Edited January 16, 2021 by Pellape Link to comment Share on other sites More sharing options...
Dimitrisgb Posted January 17, 2021 Author Share Posted January 17, 2021 The name of the NPC is Adhrisa. Link to comment Share on other sites More sharing options...
Dimitrisgb Posted January 17, 2021 Author Share Posted January 17, 2021 Ok, I wrote what you told me and I still get the same message. Link to comment Share on other sites More sharing options...
Dimitrisgb Posted January 17, 2021 Author Share Posted January 17, 2021 (edited) Ok, I wrote what you told me and I still get the same message. (Sorry. How do I delete the double messages?) Edited January 17, 2021 by Dimitrisgb Link to comment Share on other sites More sharing options...
Pellape Posted January 17, 2021 Share Posted January 17, 2021 So is she having the script or what has the script? Could you attach the whole script, not just a part of it and specify who or what has the script? Link to comment Share on other sites More sharing options...
Striker879 Posted January 17, 2021 Share Posted January 17, 2021 To be more specific, I am trying to fix some bugs in an alreay existing result script. I want to change the name of the NPC that is there to the correct name the NPC has. For example, I have wrongly written Ahdrisa, while the name is Adhrisa (d before h). When I change it it says that 'rent' is an unknown variable, which apparentlly wasn't when I first created it. So, what has changed and the 'rent' is an unknown variable. Added some highlight in case you missed it Pekka ... I'm guessing it's a dialogue result script. Link to comment Share on other sites More sharing options...
Pellape Posted January 17, 2021 Share Posted January 17, 2021 (edited) I cannot find any Ahdrisa nor Adhrisa so Dimitrisgb must provide all info so lets see what info we need.Which NPC did you choose to edit?Where did you made the edit?Provide all other necessary info we need to be able to solve this and I will try to make a step to step instruction how to do it. Innkeepers are a bit tricky which we have debated in a previous thread Edited January 17, 2021 by Pellape Link to comment Share on other sites More sharing options...
Recommended Posts