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:
  • 1 Vote(s) - 4 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Local Variables - problem
Elven Offline
Posting Freak

Posts: 862
Threads: 37
Joined: Aug 2011
Reputation: 26
#1
Local Variables - problem

I dont get it. What's the problem Sad. How can I use steps actually in there? It gives me error that for example in if statement, I cant use string and int, even tho int is stored inside the string :/.

void stepadder(string &in asTimer)
{
GetLocalVarInt("steps");
if("steps" < 24)
{
AddLocalVarInt("steps", 1);
AddTimer("", 1, "stepadder");
AddTimer("", 0, "stepeffect");
}
else
{
//finish stepping
}
}

void stepeffect(string &in asTimer)
{
GetLocalVarInt("steps");
CreateParticleSystemAtEntity("step" + "steps", "ps_guardian_appear_explosion.ps", "ScriptArea_" + "steps" ,false);
}

Ok, never mind Smile. I changed "steps" with GetLocalVarInt("steps") and it solved my problem!

I didn't do proper research Smile!

Sad part it really doesn't still work as I want, but I'll get it to work! Got it to work Wink

The Interrogation
Chapter 1

My tutorials
(This post was last modified: 08-22-2011, 12:30 PM by Elven.)
08-22-2011, 12:08 PM
Find


Messages In This Thread
Local Variables - problem - by Elven - 08-22-2011, 12:08 PM
RE: Local Variables - problem - by Kyle - 08-22-2011, 01:41 PM
RE: Local Variables - problem - by Elven - 08-22-2011, 02:58 PM
RE: Local Variables - problem - by Your Computer - 08-22-2011, 06:43 PM
RE: Local Variables - problem - by Elven - 08-22-2011, 06:47 PM



Users browsing this thread: 3 Guest(s)