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.

Bug Reports / {DBP 7.5,14] possible type error?

Author
Message
HowDo
21
Years of Service
User Offline
Joined: 28th Nov 2002
Location: United Kingdom
Posted: 2nd Aug 2010 21:04 Edited at: 2nd Aug 2010 21:06
Now is this a type error, or is it I don't understand how types work.

if I try give a varaible a value it gives an error.

run code to see what I mean.



Dark Physics makes any hot drink go cold.
Benjamin
21
Years of Service
User Offline
Joined: 24th Nov 2002
Location: France
Posted: 2nd Aug 2010 21:27
You're trying to assign a float to a variable declared as your own type... what do you expect to happen?
HowDo
21
Years of Service
User Offline
Joined: 28th Nov 2002
Location: United Kingdom
Posted: 2nd Aug 2010 21:36 Edited at: 2nd Aug 2010 21:44
Ok but if I make it a b it works so why not with p, plus if I try to print p I get and error using text0,0,str$(p) but not with print p.

edit

ok penny dropped, close thread.

Dark Physics makes any hot drink go cold.
Benjamin
21
Years of Service
User Offline
Joined: 24th Nov 2002
Location: France
Posted: 2nd Aug 2010 21:44
Quote: "Ok but if I make it a b it works so why not with p"


I'm not sure what you mean by this, could you post some code demonstrating this?

Quote: "I get and error using text0,0,str$(p) but not with print p."


When you pass a UDT as an argument it actually passes each field as its own argument. I'm guessing print supports variable arguments, which is why it works. How do you expect to get a string representation of a UDT anyway?
HowDo
21
Years of Service
User Offline
Joined: 28th Nov 2002
Location: United Kingdom
Posted: 2nd Aug 2010 21:49
ok ,I now seen what I missed in my thinking, I left out I had put a global p as player.

so close thread and reject.

Dark Physics makes any hot drink go cold.

Login to post a reply

Server time is: 2024-04-26 09:32:05
Your offset time is: 2024-04-26 09:32:05