Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

Newcomers DBPro Corner / Another Unity Problem

Author
Message
vorconan
18
Years of Service
User Offline
Joined: 4th Nov 2006
Location: Wales
Posted: 23rd Dec 2007 01:23
Again I'm back with a Unity scripting issue.

Problem : I've made a type to reorganise my scattered code, when I try to assign a value to a variable made with that type, it still stays as zero, I haven't got a clue why it shouldn't work. Stangely aswell, even if I print the value to the screen directly from the script, it won't work either.



Thanks for any help in advance.

Note - The value in the script is 1 defintely.



Zotoaster
19
Years of Service
User Offline
Joined: 20th Dec 2004
Location: Scotland
Posted: 23rd Dec 2007 02:47
Maybe since the value is 1, it is an integer, so you dont get anything trying to read it as a float..

Your signature has been erased by a mod
vorconan
18
Years of Service
User Offline
Joined: 4th Nov 2006
Location: Wales
Posted: 23rd Dec 2007 16:02
Yeah, I thought about that, but 1.0 still gives 0.

Thanks anyway



pdq
18
Years of Service
User Offline
Joined: 20th Jul 2006
Location:
Posted: 23rd Dec 2007 22:07
Try changing...



to this...


Hope that helps.
Bozzy
18
Years of Service
User Offline
Joined: 10th Sep 2006
Location: Birmingham, UK
Posted: 23rd Dec 2007 23:42
Is it in a table, or is that even the right name (case???) for the variable lol

Maybe just looking at this script file will help us to help you

Cheers,
Bozzy

"I'm a firm believer that if a team scores one goal, then the other has to score two to win."
vorconan
18
Years of Service
User Offline
Joined: 4th Nov 2006
Location: Wales
Posted: 26th Dec 2007 12:43
Weird, I restarted the computer and it decided to work

@pdq

The variable was already declared a float in the type.

Thanks for the help anyway guys



Login to post a reply

Server time is: 2024-11-26 05:51:13
Your offset time is: 2024-11-26 05:51:13