From now on, i am gonna look at scripting errors and fixes and put them here. Cause lately, i have seen many noobs posting the same error over and over again. It would be great if this ever get's stickied. But let's get this done. So, if you, the users of the forum, or I fix errors, they will get put here. Later, when i have enough, i will still update this, but i will remove these sentences and remove the [WIP] in front.
1. Am i capable of making a CS ?
A question you should ask yourself when beginning creating custom stories for the FIRST time!.
How good are you at scripting and mapping? That will determine what level of difficulty there is to do anything.
If you are completely noobish at scripting, then you better look at tutorials before you attempt to do anything scripting related, and then practice your syntax and stuff without getting too complicated in your attempts. Trust me, scripting, is not an easy task, mind you, and it took me a lot of time to understand what I was doing and clean up my scripting.
You should always start small. Open up a map that Frictional Games map. Look at how they laid out their map. Then, make a room in the LevelEditor. Don't add any scripting things, just make a room and get it playable so you can move around and interact with objects. Just try to make a great atmosphere.
When scripting, the same principle applies. Think small scale for the beginning. Make a key that can open a door. Have a door that slams shut when you approach it, etc. They are not hard to implement, you just need to know how to begin. You'll receive a lot of errors when scripting, it's natural, you just have to know how to debug them. We can help with that.
This is an error mostly comes. But what does it mean? It will always display the last line of the code. And this can be really hard to find in a huge script. Lets pick a example script. Where the problem is at.
I chose it from this thread.
HEY! What is the problem of the code?!
Oh, hey sorry, haha. The problem of this code is mostly a missing " at the end of a name. For example. There is a " missing at line 11. But it displays line 18 on here! That's cause it can't find the end of it! So it snaps to the last line of code to find the ending ".