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
How to convert a string to an integer?
cook Offline
Member

Posts: 103
Threads: 6
Joined: Apr 2011
Reputation: 0
#1
How to convert a string to an integer?

As the title says, making a script that returns the Entity's 6th letter(which is a number) that is being interacted with to a string using SetLocalVarString("bigman", StringSub(asEntity, 5, 1));, but that didn't work. Couldn't use LocalVarInt bigman either. I believe I need a way to convert it to an integer to make use of it like so SetEntityActive("crowbar_joint_"+"bigman", true);

It's for a crowbar that works on all doors script so I don't have to copy like 30 lines of code 9 times, if anyone could think of a easier way to do it please tell me.

Also, while I am here, what is the actual definition of a signature?
(This post was last modified: 06-11-2011, 05:42 AM by cook.)
06-11-2011, 05:26 AM
Find


Messages In This Thread
How to convert a string to an integer? - by cook - 06-11-2011, 05:26 AM



Users browsing this thread: 1 Guest(s)