Jump to content
  • 0

Set variable as a word?


Question

Posted (edited)

Hey guys,

 

How do I set a variable as a word? I know that, for example, I can set a variable as a string with something like this:

 

set #bankpoints,"" + strcharinfo(2) + "";

 

But, what if I just want to make that variable equivelant to a word? So, for example, what if I just wanted to have it be like this:

 

set #bankpoints,"You are rich!";

 

I've tried doing it by simply using quotes and other things, but it doesn't seem to work, am I missing something? Thanks.

Edited by greenmagic469

2 answers to this question

Recommended Posts

  • 0
Posted (edited)

Every string variable should end with $.
Like: #bankpoints$

Examples:
  name  - permanent character integer variable
  name$ - permanent character string variable
 @name  - temporary character integer variable
 @name$ - temporary character string variable
 $name  - permanent global integer variable
 $name$ - permanent global string variable
$@name  - temporary global integer variable
$@name$ - temporary global string variable
 .name  - NPC integer variable
 .name$ - NPC string variable
.@name  - scope integer variable
.@name$ - scope string variable
 #name  - permanent local account integer variable
 #name$ - permanent local account string variable
##name  - permanent global account integer variable
##name$ - permanent global account string variable

Edited by Haziel
  • Upvote 1

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...