Jump to content

can someone tell me what the problem in this script is.....


Recommended Posts

if bool (if it's true)

; things happen

.

I understand how boolean variables operate and are applied in conditional statements, how they're evaluated ect. Thanks for the reply. I'm asking about the logic of that particular function isnearplayer(). The example shows using the ! Operator b4 a variable in the function call I'm wondering if

If( !ref.isnearplayer() )== true ;if ref not near player

 

If ref.isnearplayee() ==true ; if ref is near player

Link to comment
Share on other sites

Ref.IsNearPlayer() will return true if the reference is less than X units (I think it is 1,000) from the player. If you add the ! operator it reverses the outcome, so !Ref.IsNearPlayer() will return false if the reference is less than X units away.

Link to comment
Share on other sites

I prefer the bool == true/false thing because it's less confusing.

 

^THIS fully qualified explicit statements makes code so much easier to maintain for self and others.

 

If you run some compiled PEX though Champollion to extract PSC you will see that the interpreter expands all the clever shorthand into fully declared statements with bodmass brackets and function variables fully expanded, so no parsing or compute saving there.

Link to comment
Share on other sites

 

I prefer the bool == true/false thing because it's less confusing.

^THIS fully qualified explicit statements makes code so much easier to maintain for self and others.

 

If you run some compiled PEX though Champollion to extract PSC you will see that the interpreter expands all the clever shorthand into fully declared statements with bodmass brackets and function variables fully expanded, so no parsing or compute saving there.

 

I am always so happy I first learned to code in C / C++ and that the instructors pushed us to to make our statements fully explicit. I can go back and look at old code and figure it out much more easily than if I was doing fancy shorthand. Edited by Reneer
Link to comment
Share on other sites

 

 

I prefer the bool == true/false thing because it's less confusing.

^THIS fully qualified explicit statements makes code so much easier to maintain for self and others.

 

If you run some compiled PEX though Champollion to extract PSC you will see that the interpreter expands all the clever shorthand into fully declared statements with bodmass brackets and function variables fully expanded, so no parsing or compute saving there.

 

I am always so happy I first learned to code in C / C++ and that the instructors pushed us to to make our statements fully explicit. I can go back and look at old code and figure it out much more easily than if I was doing fancy shorthand.

 

lol you guys... don't point the finger at me i just copied the example. Obviously i was slightly confused or i wouldn't have asked. They can't make the examples like idiot proof.... that would be to easy. They don't want mediocre coders playing with this stuff. I did however sign up for the wiki bc i am going to change some things as im learning bc it is truly ridiculous. I encourage you all to do the same. If your looking at something on there and its total crap, explain it so a moron could understand. Probably be 3x as many modders in this game if the language was explained better.

 

 

I literally spent like 5 hours trying to get notepad++ up and running with the papyrus compiler bc the wiki had errors in it ect. most people would have quite and just called it broken.... I fixed it and i edited the wiki. I figured after all that effort i would help someone else out. Got a crash course in .bat files and cmd prompts while i was at it.... anyone need a bat file? im your guy

Edited by markyrocks
Link to comment
Share on other sites

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...