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
Unexpected End Of File
Banderson96 Offline
Junior Member

Posts: 2
Threads: 1
Joined: Jun 2013
Reputation: 0
#1
Unexpected End Of File

Hi I can't figure out what the problem is with my script.
Any help is appreciated! Big Grin


Attached Files
.txt   Amnesia Script.txt (Size: 1.95 KB / Downloads: 132)
06-18-2013, 02:58 AM
Find
PutraenusAlivius Offline
Posting Freak

Posts: 4,713
Threads: 75
Joined: Dec 2012
Reputation: 119
#2
RE: Unexpected End Of File

PHP Code: (Select All)
FadeEnemyToSmoke("grunt_1, bool "scare_tingeling_rev.ogg"); 

You forgot a closing quotation mark for grunt_1 and a wrong bool value.
It should be this.

PHP Code: (Select All)
FadeEnemyToSmoke("grunt_1"true); //Use true if you want to use sound, false if you don't. You can't modify the sound as far as I know. 

"Veni, vidi, vici."
"I came, I saw, I conquered."
06-18-2013, 03:25 AM
Find
Banderson96 Offline
Junior Member

Posts: 2
Threads: 1
Joined: Jun 2013
Reputation: 0
#3
RE: Unexpected End Of File

(06-18-2013, 03:25 AM)JustAnotherPlayer Wrote:
PHP Code: (Select All)
FadeEnemyToSmoke("grunt_1, bool "scare_tingeling_rev.ogg"); 

You forgot a closing quotation mark for grunt_1 and a wrong bool value.
It should be this.

PHP Code: (Select All)
FadeEnemyToSmoke("grunt_1"true); //Use true if you want to use sound, false if you don't. You can't modify the sound as far as I know. 

WOW Thanks! Big Grin
06-18-2013, 03:52 AM
Find
CarnivorousJelly Offline
Posting Freak

Posts: 1,196
Threads: 41
Joined: Dec 2012
Reputation: 80
#4
RE: Unexpected End Of File

For future reference, support questions should go in Developement Support. You're more likely to get help quickly there :)

Just to add on to what JAP said:
  • Strings are names of things and go in brackets (example: "servant_grunt_1")
  • Bools are true/false values
  • Floats are always decimal values with an f (example: 0.125f), the most common type is a time variable where the float value is given in seconds
  • Int (Integers) are whole-number values and cannot have decimal places (example: 1)
  • Text that isn't part of the script is indicated by two forward slashes (example: //Fix this later)
If you're using Notepad instead of Geany or Notepad++, I would highly recommend switching. Both of the programs I suggested are free :D

Once you've downloaded one (or both) of those programs, change the language in it to C++. That way, your strings, bools, and floats are colour-coded. It's just a really nifty way of making sure you don't forget a bracket or an f somewhere :p

In Notepad++, the language options are in the top bar, not hard to find at all. C++ is under the C drop-down menu. Floats and ints are orange, strings are grey, bools are blue, and non-script text (side-notes) are green.

In Geany, I have no idea because I never downloaded it :p I just know it's a program that a lot of other people here use.

Oh, and welcome to the forum!

Thanks for catching the int thing, Adrianis!

[Image: quote_by_rueppells_fox-d9ciupp.png]
(This post was last modified: 06-18-2013, 09:56 PM by CarnivorousJelly.)
06-18-2013, 08:40 AM
Find
Adrianis Offline
Senior Member

Posts: 620
Threads: 6
Joined: Feb 2012
Reputation: 27
#5
RE: Unexpected End Of File

Quote: Floats & int's are orange
Updated Smile
  • An int is a whole number (no decimal place), unlike floats which do have decimal places an int cannot
int - 1, 5, 55, 25346
float - 1.00, 2.56, 6543.224

06-18-2013, 06:37 PM
Find
DeAngelo Offline
Senior Member

Posts: 263
Threads: 26
Joined: Feb 2013
Reputation: 11
#6
RE: Unexpected End Of File

I hate that error. Every other error (mostly) tells you exactly where in your script the error is. But this smug bastard of an error just goes "Go find it yourself, loser"

A Late Night Drink http://www.moddb.com/mods/a-late-night-drink
Check out my LP channel, CatBearGaming, I take all Custom Story requests!
06-18-2013, 06:38 PM
Find
Adrianis Offline
Senior Member

Posts: 620
Threads: 6
Joined: Feb 2012
Reputation: 27
#7
RE: Unexpected End Of File

Yeh but at least it gives you a solid idea of whats causing the issue!




/sarcasm

(This post was last modified: 06-18-2013, 06:49 PM by Adrianis.)
06-18-2013, 06:49 PM
Find




Users browsing this thread: 4 Guest(s)