antstubell Posted August 2, 2019 Share Posted August 2, 2019 What's the correct way to parse this.. If iButtonA == 1 && ObjToBeDest.GetValue() == 0; cannot be destroyed int is not a known user-defined typecannot compare a none to a int (cast missing or types unrelated) Link to comment Share on other sites More sharing options...
IsharaMeradin Posted August 2, 2019 Share Posted August 2, 2019 Try: If (iButtonA == 1) && (ObjToBeDest.GetValue() == 0.0) Link to comment Share on other sites More sharing options...
antstubell Posted August 3, 2019 Author Share Posted August 3, 2019 I get the same errors. Link to comment Share on other sites More sharing options...
IsharaMeradin Posted August 3, 2019 Share Posted August 3, 2019 You may have an error on a previous line affecting the processing of lines below. Won't know that without the full script and the full compiler error. Otherwise, all I can suggest is to make sure you have all your variables properly declared and defined. As it sounds like iButtonA may not have a value associated with it and thus not comparing well with a value of 1. But it could also be an issue with the ObjToBeDest variable. So double check both. Link to comment Share on other sites More sharing options...
RichWebster Posted August 3, 2019 Share Posted August 3, 2019 If it is indeed that line the problem is with the iButtonA. Also if you're getting script errors it's helpful if you post the script and the full error. Stop people having to guess mate. Link to comment Share on other sites More sharing options...
antstubell Posted August 3, 2019 Author Share Posted August 3, 2019 Of course... ObjectReference Property StartFuseMarker AutoObjectReference Property RocksMarker AutoObjectReference Property ExpMarker AutoExplosion Property MyExp AutoExplosion Property MyExp2 AutoInt Property ObjToBeDest AutoLight Property HasTorch AutoMagicEffect Property MyEff AutoMessage Property Greet AutoMessage Property NeedGPowder AutoMessage Property NeedSewKit AutoMessage Property NeedGunSew AutoMessage Property EquipTorch AutoMessage Property NeedFlame AutoMessage Property ExpMenu AutoMessage Property SBack AutoMiscObject Property GPowder AutoMiscObject Property SewKit AutoSound Property ExpSND AutoString Property Text1 AutoString Property Text2 Auto; ObjToBeDest values associated with destructible items; 0 Solid structures that can only be blown up – rocks, solid wood; 1 Objects that can be ignited with kindling or accelerant – log piles; 2 Objects that are easily ignitable – paper, material, oilAuto State WaitingEvent OnActivate(ObjectReference akActionRef)if (akActionRef == Game.GetPlayer())Int iButtonA = Greet.Show() ; Shows first menu; check to see if player Literally Has Nothing usefulIf iButtonA == 0; explosives chosenExplosivesOptions()EndIf;31If (iButtonA == 1) && (ObjToBeDest.GetValue() == 0.0); fire chosen but won’t work on this objectdebug.notification("It’s too solid to be set alight")GoToState("Waiting")elseFireOptions()EndIfIf iButtonA == 2; other chosenOtherOptions()EndIfGoToState("Waiting")EndIfdebug.notification("Script Ended")EndEventEndState;----------------------------------------------------------------------Function ExplosivesOptions()debug.notification("Explosives Chosen")Int iButtonExp = ExpMenu.Show(); shows explosives menu which checks inventoryIf iButtonExp == 0; gunpowderdebug.notification("Gunpowder Chosen")EndIfEndFunctionFunction FireOptions()debug.notification("Fire Chosen")EndFunctionFunction OtherOptions()debug.notification("Other Chosen")EndFunction (39,35): int is not a known user-defined type(39,46): cannot compare a none to a float (cast missing or types unrelated) Link to comment Share on other sites More sharing options...
RichWebster Posted August 3, 2019 Share Posted August 3, 2019 You're calling GetValue() on an Int property, but that's a global variable function. ObjToBeDest.GetValue() == 0 Should be: ObjToBeDest == 0 And make sure the property is filled correctly in the CK. Link to comment Share on other sites More sharing options...
antstubell Posted August 3, 2019 Author Share Posted August 3, 2019 This is going to be an issue. I intend the script, when finished, to cover all occurances of blowing s**t up. Int Property ObjToBeDest Auto That line is intended for use so as I can input the value depending on the object about to blown up or set fire to as mentioned in the comments.Otherwise I am going to write a new script for each episode of 'blow s**t up.'This method sounded practical when I started - now, I dunno. Link to comment Share on other sites More sharing options...
maxarturo Posted August 3, 2019 Share Posted August 3, 2019 (edited) .... Edited August 4, 2019 by maxarturo Link to comment Share on other sites More sharing options...
antstubell Posted August 3, 2019 Author Share Posted August 3, 2019 @maxarturo - Er… No.Script is similar to what we previously worked on. Script will go through various inventory checks but firstly script needs to know what object the player is dealing with - hence the comments.; ObjToBeDest values associated with destructible items; 0 Solid structures that can only be blown up – rocks, solid wood; 1 Objects that can be ignited with kindling or accelerant – log piles; 2 Objects that are easily ignitable – paper, material, oil These are for my purpose. I will input the value. Script is intending to be an all round 'blow up stuff' script. In the scenario I was working on when this script came to mind - player approaches a supporting beam. Through clues, etc, player knows that destroying this beam will release a trap bridge above and player can continue. In other scenarios player will approach a fallen tree, this can be dealt with a naked flame or the object is easily ignitable like paper, cloth again naked flame. Some objects, like the script we previously worked on will require ignition, flame/flint and an kindling/accelerant. The final category is 'Other'. If a scenario can be solved, optionally, with another simpler/obvious method, in the case of the beam if player has a saw then he/she can saw through it (more time consuming but equally possible).So this all in one script would only present menus depending on the object that needs dealing with.In the case of the beam, which can be blown up or if player has found a saw cut through, I would enter the value 0 in the property...Int Property ObjToBeDest AutoSo the line I posted above...If iButtonA == 1 && ObjToBeDest.GetValue() == 0; cannot be destroyed… says the player chose 'fire' option the integer value tells me that this object cannot be destroyed by fire - therefore I will show a message saying this and go back to the menu options.Basically the value entered will filter options presented. Link to comment Share on other sites More sharing options...
Recommended Posts