Vice City: Multiplayer

Server Development => Scripting and Server Management => Topic started by: killvn on Feb 18, 2015, 07:26 AM

Title: About Scripting Squirrel Program ?
Post by: killvn on Feb 18, 2015, 07:26 AM
Hello ... i used PAWNO for 0.3 Z VCMP version before and now change to 0.4 version i use notepad++ for editing Squirrel ... it's very new for me but i will try my best ...

I wonder if Squirrel have a program can automatic found the error when i code ... i mean when i use PAWNO before ... it's had the fuction called "compile" to export from pwn file to amx file extension ... and when i make error such as missing the { ... etc ... it's show the error and can't run ... without error it's will run smoothy ... It's help me alot because it show the error for me :)

That's all ... thank you for reading :)
Title: Re: About Scripting Squirrel Program ?
Post by: . on Feb 18, 2015, 07:59 AM
Unfortunately Squirrel is a dynamically typed language. Which means that some of the errors might explode in your face at run-time when they're used. However, syntax errors will most likely show up at compile-time and the module will fail to load because of them anyway. And the error message will be printed to the console. Please be aware the PAWNO and Squirrel are two different animals and they shouldn't be treated the same or have the same expectations from one to another.

Also VC:MP doesn't allow pre-compiled code. And the code is compiled when needed which is why there's no need for a separate compiler.
Title: Re: About Scripting Squirrel Program ?
Post by: Gudio on Feb 18, 2015, 11:03 AM
Quote from: S.L.C on Feb 18, 2015, 07:59 AMAlso VC:MP doesn't allow pre-compiled code.
You are wrong. (http://squirreldoc.neonapple.com/v3/lib.io.writeclosuretofile.html) Compiled scripts can be easily loaded on the server.
Title: Re: About Scripting Squirrel Program ?
Post by: . on Feb 18, 2015, 11:28 AM
Quote from: Gudio on Feb 18, 2015, 11:03 AM
Quote from: S.L.C on Feb 18, 2015, 07:59 AMAlso VC:MP doesn't allow pre-compiled code.
You are wrong. (http://squirreldoc.neonapple.com/v3/lib.io.writeclosuretofile.html) Compiled scripts can be easily loaded on the server.

I know you can do that. Cmon, seriously? Do you really think I'm that noob? However VC:MP does not allow people to distribute pre-compiled code. Mainly because I can do a ton of malicious stuff with that code and you wouldn't even know about it. Since you can't look at the code. That's what I actually meant.
Title: Re: About Scripting Squirrel Program ?
Post by: Gudio on Feb 18, 2015, 12:20 PM
Quote from: S.L.C on Feb 18, 2015, 11:28 AMHowever VC:MP does not allow people to distribute pre-compiled code.
That sounds a lot better.