Menu
News
All News
Dungeons & Dragons
Level Up: Advanced 5th Edition
Pathfinder
Starfinder
Warhammer
2d20 System
Year Zero Engine
Industry News
Reviews
Dragon Reflections
White Dwarf Reflections
Columns
Weekly Digests
Weekly News Digest
Freebies, Sales & Bundles
RPG Print News
RPG Crowdfunding News
Game Content
ENterplanetary DimENsions
Mythological Figures
Opinion
Worlds of Design
Peregrine's Nest
RPG Evolution
Other Columns
From the Freelancing Frontline
Monster ENcyclopedia
WotC/TSR Alumni Look Back
4 Hours w/RSD (Ryan Dancey)
The Road to 3E (Jonathan Tweet)
Greenwood's Realms (Ed Greenwood)
Drawmij's TSR (Jim Ward)
Community
Forums & Topics
Forum List
Latest Posts
Forum list
*Dungeons & Dragons
Level Up: Advanced 5th Edition
D&D Older Editions, OSR, & D&D Variants
*TTRPGs General
*Pathfinder & Starfinder
EN Publishing
*Geek Talk & Media
Search forums
Chat/Discord
Resources
Wiki
Pages
Latest activity
Media
New media
New comments
Search media
Downloads
Latest reviews
Search resources
EN Publishing
Store
EN5ider
Adventures in ZEITGEIST
Awfully Cheerful Engine
What's OLD is NEW
Judge Dredd & The Worlds Of 2000AD
War of the Burning Sky
Level Up: Advanced 5E
Events & Releases
Upcoming Events
Private Events
Featured Events
Socials!
EN Publishing
Twitter
BlueSky
Facebook
Instagram
EN World
BlueSky
YouTube
Facebook
Twitter
Twitch
Podcast
Features
Top 5 RPGs Compiled Charts 2004-Present
Adventure Game Industry Market Research Summary (RPGs) V1.0
Ryan Dancey: Acquiring TSR
Q&A With Gary Gygax
D&D Rules FAQs
TSR, WotC, & Paizo: A Comparative History
D&D Pronunciation Guide
Million Dollar TTRPG Kickstarters
Tabletop RPG Podcast Hall of Fame
Eric Noah's Unofficial D&D 3rd Edition News
D&D in the Mainstream
D&D & RPG History
About Morrus
Log in
Register
What's new
Search
Search
Search titles only
By:
Forums & Topics
Forum List
Latest Posts
Forum list
*Dungeons & Dragons
Level Up: Advanced 5th Edition
D&D Older Editions, OSR, & D&D Variants
*TTRPGs General
*Pathfinder & Starfinder
EN Publishing
*Geek Talk & Media
Search forums
Chat/Discord
Menu
Log in
Register
Install the app
Install
Upgrade your account to a Community Supporter account and remove most of the site ads.
Community
General Tabletop Discussion
*Geek Talk & Media
Help with Visual Basic
JavaScript is disabled. For a better experience, please enable JavaScript in your browser before proceeding.
You are using an out of date browser. It may not display this or other websites correctly.
You should upgrade or use an
alternative browser
.
Reply to thread
Message
<blockquote data-quote="Majin Trugeta" data-source="post: 176762" data-attributes="member: 4064"><p><strong>Well..</strong></p><p></p><p>Thanks for the replies. Putting it all on one form occured to me but in the end I decided to go with multiple forms for multiple reasons, most self evident in some way. Each way has its advantages. (like if I woulda put it all on one form I prolly wouldn't be here bugging you guys, lol) but since I've taken the time to design all those forms and put individual code behind them I'd like to keep them and find some sort of work around for this. I just dont understand why the global variables aren't "catching hold" to the other forms. </p><p></p><p>The way I have it is I have 6 integers dimensioned. (one for each alignment piece, two for neutral (ethical/moralistic versions) They act as counters basically and when you go on to the next page I have code that (by if statements) determines which radio button's value is "true" and it increments the particular variable. (ie. If you chose option button number 4 (optFour, conveniently) then depending on the "alignment" of the answer will increment that variable 1 or 2. (People with the HBG should know what I'm talking about if they take a look at the scoring system)</p><p></p><p>It does this seperately for each form (because each set of answers is different, having different combinations of alignment choices.) I also have two integers (used to be strings) declared for a the moral alignment value, and the ethical one. Then on the very last form I have the code that determines this: Depending on which ethical alignment you chose most and what moralistic alignment you chose most in your question answering each is supposed to be assigned a value. Then I have a large if/elseif statement determined which variables are both true. lets say the value of "1" for the ethical alignment integer = lawful and "2" for the moral alignment = evil. I test to see if both of these is true. If not then I pass on to another combination running down the line of all 9 alignments. If one comes out to be true then it outputs the data in some local strings I've defined and filled in based on which alignment it came out to be. The corresponding string holds the PHB's description of said alignment.</p><p></p><p>This is where I'm getting the error. The last form with all the code complains that it doesn't recognize all the integers I have selected. First off they were only declared as modular (stupid me) but even when searching for every instance and changing everything that I can think of to Public g**** it still doesn't work.</p><p></p><p>Also if I just declare the variables locally in the last form that does all the calculations just to get a result it gives me an error box (error checking implemented by myself, meaning that out of the 9 "correct" outcomes of the test, neither of them is true. So I'm just stumped totally on how to get that to work. I'm not sure if the above suggestion would help because of the way I'm going about doing things, but this is a much more detailed explanation on what my code is doing so hopefully this helps explain my current situation better and somebody can make some sort of sense out of it. Thanks for any more help you can give on this.</p></blockquote><p></p>
[QUOTE="Majin Trugeta, post: 176762, member: 4064"] [b]Well..[/b] Thanks for the replies. Putting it all on one form occured to me but in the end I decided to go with multiple forms for multiple reasons, most self evident in some way. Each way has its advantages. (like if I woulda put it all on one form I prolly wouldn't be here bugging you guys, lol) but since I've taken the time to design all those forms and put individual code behind them I'd like to keep them and find some sort of work around for this. I just dont understand why the global variables aren't "catching hold" to the other forms. The way I have it is I have 6 integers dimensioned. (one for each alignment piece, two for neutral (ethical/moralistic versions) They act as counters basically and when you go on to the next page I have code that (by if statements) determines which radio button's value is "true" and it increments the particular variable. (ie. If you chose option button number 4 (optFour, conveniently) then depending on the "alignment" of the answer will increment that variable 1 or 2. (People with the HBG should know what I'm talking about if they take a look at the scoring system) It does this seperately for each form (because each set of answers is different, having different combinations of alignment choices.) I also have two integers (used to be strings) declared for a the moral alignment value, and the ethical one. Then on the very last form I have the code that determines this: Depending on which ethical alignment you chose most and what moralistic alignment you chose most in your question answering each is supposed to be assigned a value. Then I have a large if/elseif statement determined which variables are both true. lets say the value of "1" for the ethical alignment integer = lawful and "2" for the moral alignment = evil. I test to see if both of these is true. If not then I pass on to another combination running down the line of all 9 alignments. If one comes out to be true then it outputs the data in some local strings I've defined and filled in based on which alignment it came out to be. The corresponding string holds the PHB's description of said alignment. This is where I'm getting the error. The last form with all the code complains that it doesn't recognize all the integers I have selected. First off they were only declared as modular (stupid me) but even when searching for every instance and changing everything that I can think of to Public g**** it still doesn't work. Also if I just declare the variables locally in the last form that does all the calculations just to get a result it gives me an error box (error checking implemented by myself, meaning that out of the 9 "correct" outcomes of the test, neither of them is true. So I'm just stumped totally on how to get that to work. I'm not sure if the above suggestion would help because of the way I'm going about doing things, but this is a much more detailed explanation on what my code is doing so hopefully this helps explain my current situation better and somebody can make some sort of sense out of it. Thanks for any more help you can give on this. [/QUOTE]
Insert quotes…
Verification
Post reply
Community
General Tabletop Discussion
*Geek Talk & Media
Help with Visual Basic
Top