SRL Archive - News and General

General Help.


turbobk

2009-10-14 11:21:19

Hey Guys,

Just a little bit stumped on this.
Ok I'm trying to make something in SCAR. (Too complicated to explain).

But basically I input this
Result := IntToStr((( z * 2 ) + 76561197960265728 + y));

In this case,
z = 235800
y = 1

And scar outputs the Result as: 471601

So its adding everything up correctly except for 76561197960265728.
Any reason why this is?

Please let me know.
Thanks :)

JAD

2009-10-14 11:29:04

76561197960265728 Is too big of a number for an integer variable to hold. You are going to have to use a LongInt to hold that value.

nielsie95

2009-10-14 11:36:44

LongInt has the same range as a normal integer, what you're looking for is Int64 (limit -> 9223372036854775807).

Naum

2009-10-14 13:03:07

Basically Int64ToStr(stuff goes in here).

:)

turbobk

2009-10-14 21:42:38

Ok Thanks alot for all your help guys!
Works like a charm! :)