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.

Author
Message
Silverwizard
22
Years of Service
User Offline
Joined: 5th Mar 2003
Location:
Posted: 6th Mar 2003 03:31
I am trying to make a program for my own program library that creates stats such as those used in a Role Playing Game. Unfortunatly there is a built in perameter that does not allow me to use global variables in my functions. Is there a way around this? (Arrays do not work).
PiratSS
22
Years of Service
User Offline
Joined: 18th Oct 2002
Location:
Posted: 6th Mar 2003 05:05
Did you try memblocks?

The best way got passing values to Multiplayer/function in DBC i think.


Toughest line of codecol$=asc(left(Pcol$)),1+str$(rev)+chr(80)+left(right(mid(name$),1),1)
Jadelion
22
Years of Service
User Offline
Joined: 14th Jan 2003
Location:
Posted: 6th Mar 2003 08:53
since I don't know exactly what you are trying to do, I'll make stuff up. My theory is that you want to pass a global value representing the players level into a function but you can't striaght to that. So we have to pass the global value into the array via a parameter and return a value into another global like so



...that move was indeed...Bold.
arras
22
Years of Service
User Offline
Joined: 3rd Feb 2003
Location: Slovakia
Posted: 6th Mar 2003 10:00
Store your walues in arrays, they sure work. They will aply both inside and outside of function:

dim myvalues(20,20)

do
changevalues
loop

function changevalues()

for a to 20
for b to 20
myvalue(a,b)=myvalue(a,b)+2
next b
next a

endfunction

I am always using arrays to move multiple values out of function. I am using DB113 by the way.

Login to post a reply

Server time is: 2025-08-08 20:40:15
Your offset time is: 2025-08-08 20:40:15