Click here to Skip to main content
15,889,417 members
Home / Discussions / C#
   

C#

 
GeneralRe: Trouble passing variables Pin
lukeer27-Aug-12 2:04
lukeer27-Aug-12 2:04 
GeneralRe: Trouble passing variables Pin
drgsldr6927-Aug-12 2:24
drgsldr6927-Aug-12 2:24 
GeneralRe: Trouble passing variables Pin
lukeer27-Aug-12 2:48
lukeer27-Aug-12 2:48 
GeneralRe: Trouble passing variables Pin
Wes Aday27-Aug-12 2:19
professionalWes Aday27-Aug-12 2:19 
GeneralRe: Trouble passing variables Pin
drgsldr6927-Aug-12 2:26
drgsldr6927-Aug-12 2:26 
GeneralRe: Trouble passing variables Pin
Wes Aday27-Aug-12 2:54
professionalWes Aday27-Aug-12 2:54 
GeneralRe: Trouble passing variables Pin
drgsldr6927-Aug-12 3:20
drgsldr6927-Aug-12 3:20 
GeneralRe: Trouble passing variables Pin
Wes Aday27-Aug-12 3:29
professionalWes Aday27-Aug-12 3:29 
drgsldr69 wrote:
int Str;

First of all, you are only defining a local variable Str of type int. That has nothing at all to do with your ShowAbilites method. You have not defined Int, Dex, or any of the other variables that you want to display. Your problem is that you do not understand variable scope.

If you are looking for a way to display them, in the limited view of your architecture that we have, you would need to pass Str, Int and the rest to your Character method so that they could in turn be passed to your ShowAbilites method. Or declare Str, Int and the rest as class level variables.
Why is common sense not common?
Never argue with an idiot. They will drag you down to their level where they are an expert.
Sometimes it takes a lot of work to be lazy
Please stand in front of my pistol, smile and wait for the flash - JSOP 2012

GeneralRe: Trouble passing variables Pin
drgsldr6927-Aug-12 5:29
drgsldr6927-Aug-12 5:29 
GeneralRe: Trouble passing variables Pin
Wes Aday27-Aug-12 5:34
professionalWes Aday27-Aug-12 5:34 
GeneralRe: Trouble passing variables Pin
drgsldr6927-Aug-12 5:36
drgsldr6927-Aug-12 5:36 
GeneralRe: Trouble passing variables Pin
Wes Aday27-Aug-12 5:42
professionalWes Aday27-Aug-12 5:42 
GeneralRe: Trouble passing variables Pin
drgsldr6927-Aug-12 5:45
drgsldr6927-Aug-12 5:45 
GeneralRe: Trouble passing variables Pin
Wes Aday27-Aug-12 6:02
professionalWes Aday27-Aug-12 6:02 
GeneralRe: Trouble passing variables Pin
drgsldr6927-Aug-12 6:18
drgsldr6927-Aug-12 6:18 
GeneralRe: Trouble passing variables Pin
Wes Aday27-Aug-12 6:34
professionalWes Aday27-Aug-12 6:34 
GeneralRe: Trouble passing variables Pin
drgsldr6927-Aug-12 7:54
drgsldr6927-Aug-12 7:54 
GeneralRe: Trouble passing variables Pin
drgsldr6927-Aug-12 7:58
drgsldr6927-Aug-12 7:58 
GeneralRe: Trouble passing variables Pin
Wes Aday27-Aug-12 8:15
professionalWes Aday27-Aug-12 8:15 
GeneralRe: Trouble passing variables Pin
drgsldr6927-Aug-12 13:53
drgsldr6927-Aug-12 13:53 
AnswerRe: Trouble passing variables Pin
BillWoodruff26-Aug-12 15:23
professionalBillWoodruff26-Aug-12 15:23 
GeneralRe: Trouble passing variables Pin
drgsldr6926-Aug-12 15:44
drgsldr6926-Aug-12 15:44 
QuestionDatabase Connection on Deployment Pin
SHASHANK SAGAR26-Aug-12 8:36
SHASHANK SAGAR26-Aug-12 8:36 
AnswerRe: Database Connection on Deployment Pin
Eddy Vluggen26-Aug-12 8:49
professionalEddy Vluggen26-Aug-12 8:49 
AnswerRe: Database Connection on Deployment Pin
Vijay Selvaraj26-Aug-12 21:53
Vijay Selvaraj26-Aug-12 21:53 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.