The following warnings occurred:
Warning [2] count(): Parameter must be an array or an object that implements Countable - Line: 906 - File: showthread.php PHP 7.2.24-0ubuntu0.18.04.17 (Linux)
File Line Function
/showthread.php 906 errorHandler->error



Facebook Twitter YouTube Frictional Games | Forum | Privacy Policy | Dev Blog | Dev Wiki | Support | Gametee


Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Script Help Carrying variables and printing them [ALTERNATIVELY SOLVED]
Spelos Away
Banned

Posts: 231
Threads: 19
Joined: Sep 2014
#1
Carrying variables and printing them [ALTERNATIVELY SOLVED]

Intro:
Hello, I'm currently working on a project that is working heavily with variables. It's a great thing and it taught me a lot so far, however I ran into a problem that is beyond my knowledge.

Problem in details:
I have a variable:
PHP Code: (Select All)
void OnStart()
{
    
SetGlobalVarInt("VarNumber"0);


It's Global since I think we need to carry it into extra_english.lang and it's Int since other functions later on are mathematically working with this variable.

Here's the problem... I want to display the variable number as a message, hopefully with some other text. My try was doing the following:
PHP Code: (Select All)
void ShowcaseFunction()
{
    
SetMessage("Messages""NumberStatus" GetLocalVarInt("VarNumber"), 0);


But that doesn't work since what it essentially does is looking for "NumberStatus0" and that doesn't exist.
I need a way of displaying the variable in the message itself.

TL;DR problem:
You have a variable that is a number. How can you display the number on player's screen?

Did you try looking for a solution somewhere else?
Yes, I'm usually not asking for help with scripts, but this got me. I'm looking for 2 days now and Google nor FrictionalGamesWiki didn't provide me with proper answer.
Thanks in advance for any response.
(This post was last modified: 07-21-2015, 10:53 AM by Spelos.)
07-20-2015, 08:20 PM
Find


Messages In This Thread
Carrying variables and printing them [ALTERNATIVELY SOLVED] - by Spelos - 07-20-2015, 08:20 PM



Users browsing this thread: 3 Guest(s)