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 / returning strings

Author
Message
matt rochon
21
Years of Service
User Offline
Joined: 15th Mar 2003
Location: Canada
Posted: 30th Mar 2003 03:59
for some reason when i return a string from a function, all i get is a huge number...

anyone have an idea why?
indi
22
Years of Service
User Offline
Joined: 26th Aug 2002
Location: Earth, Brisbane, Australia
Posted: 30th Mar 2003 04:41
try using the VAL() command on the string in question or divide it by a certain value to reduce its double long float length data

matt rochon
21
Years of Service
User Offline
Joined: 15th Mar 2003
Location: Canada
Posted: 30th Mar 2003 06:43
will the str$ command make it back into a string? or will it just make a string of that number?
matt rochon
21
Years of Service
User Offline
Joined: 15th Mar 2003
Location: Canada
Posted: 30th Mar 2003 06:49 Edited at: 30th Mar 2003 06:50
here is the code i am using
it returns the error "Equals must assign a value to a variable" on the same line as the command

myobject$ = get_item_property(items_carried$(whichitem-1299),20)

the function is set up properly as it returns integers when i use different parameters just like its supposed to

edit: whichitem = 1300
Joe Cooning
21
Years of Service
User Offline
Joined: 29th Mar 2003
Location: United States
Posted: 30th Mar 2003 07:05
The numbers it is returning is probably hexidecimal or something.Try using the HEX$() cammand on it. It converts hexidecimal to a string.
And by the way, the reason it won't store it into myobject$ is because you are trying to store an integer in a string. I don't think that works.

"Everyone has a photographic memory . . . some just don't have film."
matt rochon
21
Years of Service
User Offline
Joined: 15th Mar 2003
Location: Canada
Posted: 30th Mar 2003 07:32
im not trying to store an integer in a string

when the second parameter for the function is 20+ it returns a string

Login to post a reply

Server time is: 2024-09-20 03:44:12
Your offset time is: 2024-09-20 03:44:12