Jump to content
Search In
  • More options...
Find results that contain...
Find results in...

Varible in text


angelofdark3
 Share

Recommended Posts

Put a Call PlayerMsg before and after each incriment, that way you can see what the variable is at each step(eg:
_Dim xxx
xxx = 5
Call PlayerMsg(index, "var is " & xxx & " okay", 1)
xxx = xxx + 5
Call PlayerMsg(index, "var is " & xxx & " okay", 1)
xxx = xxx + 5
Call PlayerMsg(index, "var is " & xxx & " okay", 1)_
Link to comment
Share on other sites

the only problem is after this:

Dim xxx
xxx = 5
Call PlayerMsg(index, "var is " & xxx & " okay", 1)
xxx = xxx + 5
Call PlayerMsg(index, "var is " & xxx & " okay", 1)
xxx = xxx + 5
Call PlayerMsg(index, "var is " & xxx & " okay", 1)

xxx return to 0

i want to stay on 15
and when i repeat this i want to have it 30
Link to comment
Share on other sites

@angelofdark3:

> the only problem is after this:
>
> Dim xxx
> xxx = 5
> Call PlayerMsg(index, "var is " & xxx & " okay", 1)
> xxx = xxx + 5
> Call PlayerMsg(index, "var is " & xxx & " okay", 1)
> xxx = xxx + 5
> Call PlayerMsg(index, "var is " & xxx & " okay", 1)
>
> xxx return to 0
>
> i want to stay on 15
> and when i repeat this i want to have it 30

If sadscript supports global variables (look up the syntax for it), then just have xxx have the value equal to zero outside the function.
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...