Jump to content
  • 0

Set variable as a word?


GreenMagic793

Question


  • Group:  Members
  • Topic Count:  45
  • Topics Per Day:  0.01
  • Content Count:  157
  • Reputation:   18
  • Joined:  08/18/15
  • Last Seen:  

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
Link to comment
Share on other sites

2 answers to this question

Recommended Posts

  • 0

  • Group:  Content Moderator
  • Topic Count:  22
  • Topics Per Day:  0.00
  • Content Count:  639
  • Reputation:   597
  • Joined:  11/25/11
  • Last Seen:  

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
Link to comment
Share on other sites

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.

×
×
  • Create New...