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?
palistov Offline
Posting Freak

Posts: 1,208
Threads: 67
Joined: Mar 2011
Reputation: 57
#2
RE: How to convert a string to an integer?

I read something on the FricGames blog that mentioned AngelScript being a strong-typed language. Try this:

for(int x=1;x<2;x++) if(StringSub(asEntity, 5, 1) == x) SetLocalVarString("bigman", x);

This line doesn't try to convert the string into an integer it just tries to make a relation between the two. Change SetLocalVarString to SetLocalVarInt if that's what you need. Not sure if it will work but it's a guess Smile Good luck.

(This post was last modified: 06-11-2011, 07:11 AM by palistov.)
06-11-2011, 07:09 AM
Find


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



Users browsing this thread: 1 Guest(s)