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
Small error with simple script
FrictionalWeekly Offline
Junior Member

Posts: 19
Threads: 6
Joined: Apr 2011
Reputation: 2
#1
Small error with simple script

[Image: Ad58ni8]

It seems like a simple script so what am I missing?

Spoiler below!

int recordingState = 0

void saveGame()
{
AutoSave();
}

void SaveStation(string)
{
saveGame();
{
PlaySoundAtEntity("recording 1", "CassetteRecording5.snt", "saveStation", 0, true);
saveGame();
}
}


04-17-2017, 12:46 PM
Find
Romulator Offline
Not Tech Support ;-)

Posts: 3,628
Threads: 63
Joined: Jan 2013
Reputation: 195
#2
RE: Small error with simple script

Well, first of all, you're making 2 AutoSaves because you're calling saveGame(); twice, which you shouldn't need to anyway.

But I am pretty sure your error is the missing semi-colon on your recording state integer.

I've cleaned up your code a little. Your error also states there is an error at (96, 1), which means that, most of the time, the error is either on or slightly before line 96. Since you have only provided us around 11 lines of code, the error could have been somewhere else entirely.

PHP Code: (Select All)
int recordingState 0;

void saveGame()
{
    
AutoSave();
}

void SaveStation(string &in asString)
{
    
PlaySoundAtEntity("recording 1""CassetteRecording5.snt""saveStation"0true);
    
saveGame();


I also moved this to development support before Traggey did

Discord: Romulator#0001
[Image: 3f6f01a904.png]
(This post was last modified: 04-17-2017, 04:21 PM by Romulator.)
04-17-2017, 04:17 PM
Find




Users browsing this thread: 1 Guest(s)