Vice City Multiplayer

VC:MP => General Discussion => Topic started by: Javi on February 07, 2010, 09:40:20 PM

Title: Squirrel
Post by: Javi on February 07, 2010, 09:40:20 PM
So I keep wondering why developers care about adding Pawn to their new releases, or even improving mIRC when we all know it's a little laggy if you don't make a good use of it. Haven't you heard of Squirrel? It's pretty much faster, easier, and shorter; I could convert a 1000 lines Pawn script in Squirrel with... hmmm 400 lines? Squirrel has much more functions than mIRC and Pawn, and can work along with ini, hash, SQLite and XML. In fact, GTA IV:MP is using Squirrel. And we already have a Squirrel Wiki with all the necessary info, including some nice scripting examples. There's already an unofficial Squirrel VC:MP server.
Title: Re: Squirrel
Post by: j-king on February 07, 2010, 10:25:38 PM
+1 son
Title: Re: Squirrel
Post by: thebest12 on February 07, 2010, 10:26:08 PM
/agree with u For__e
Title: Re: Squirrel
Post by: Force on February 07, 2010, 10:30:29 PM
/me agrees as well


// Squirrel vs Pawn '/c heal' command


//////////////////////////////
///////// VC:MP Pawn /////////
//////////////////////////////

#include <a_vcmp>
#include <core>
#include <float>

#define INACTIVE_PLAYER_ID 255

public OnPlayerCommandText(playerid, cmdtext[])
{
new cmd[256];
new tmp[256];
new szMsg[256];
new idx, newvar;
cmd = strtok(cmdtext, idx);

if (strcmp(cmd, "heal", true) == 0)
{
tmp = strtok(cmdtext, idx);
if (!strlen(tmp)) { newvar = playerid; }
else { newvar = FindPlayerIDFromString(tmp); }
if (newvar == INACTIVE_PLAYER_ID) { return 1; }
if (IsPlayerInAnyVehicle(newvar)) {
SetVehicleHealth(GetPlayerVehicleID(newvar),1000.0);
SetPlayerHealth(newvar,100.0);
} else {
SetPlayerHealth(newvar,100.0);
}
return 1;
}

return 0;
}

public FindPlayerIDFromString(string[])
{// for determining player id from a string  -bakasan
new szMsg[256];
new player = INACTIVE_PLAYER_ID;
new p = 0;
while (p < MAX_PLAYERS) { if (strfind(gPlayers[p],string,true) != -1) { player=p;break; } p++; }
if (player == INACTIVE_PLAYER_ID) {// string didnt match so check if it can be an id
if ((strlen(string) > 2) || (isnumeric(string) == 0)) {
format(szMsg,sizeof(szMsg),"Unable to find %s.",string);
SendClientMessageToAll(COLOR_GREY, szMsg);
return INACTIVE_PLAYER_ID;
}
player = strval(string);// string is numeric and not more than 2 digits
}
if (!IsPlayerConnected(player)) {
format(szMsg,sizeof(szMsg),"Invalid ID %d.",player);
SendClientMessageToAll(COLOR_GREY, szMsg);
return INACTIVE_PLAYER_ID;
}
return player;// valid id found
}



//////////////////////////////
/////// VC:MP Squirrel ///////
//////////////////////////////

function onPlayerCommand( player, cmd, text )
{
if ( cmd == "heal" )
{
if ( text )
{
local plr = FindPlayer( text.tointeger() );

if ( plr )
{
if ( plr.Vehicle ) plr.Vehicle.Health = 1000.0;
plr.Health = 100;
}
else Message( "Invalid ID " + text );
}
}
}
Title: Re: Squirrel
Post by: thijn on February 07, 2010, 10:40:31 PM
Although i've never scripted in squirrel i agree to this aswell.
Title: Re: Squirrel
Post by: Jc18 on February 07, 2010, 10:41:46 PM
Quote from: thijn on February 07, 2010, 10:40:31 PM
Although i've never scripted in squirrel i agree to this aswell.


same :DDDDDDDDD
Title: Re: Squirrel
Post by: Boss on February 07, 2010, 10:42:37 PM
You don't really understand what you're talking about, do you?

Quote from: Forze on February 07, 2010, 09:40:20 PM
So I keep wondering why developers care about adding Pawn to their new releases
They're not "adding pawn" (which is pretty added already), but rather add the server functionality activated by specific pawn functions (which they implement too).

Quote from: Forze on February 07, 2010, 09:40:20 PM
or even improving mIRC
Mrc scripting haven't been improved since 0.3z.

Quote from: Forze on February 07, 2010, 09:40:20 PM
when we all know it's a little laggy
Some samples of pawn being laggy maybe? I've got a 20000 lines script back in sa-mp with an extensive use of file-reading/writing and I don't remember it making any witnessable delays. Check your "laggy" script (if you have one) for unoptimized arrays and loops.

Quote from: Forze on February 07, 2010, 09:40:20 PM
It's pretty much faster, easier, and shorter
Already commented on 1st and 2nd is not neccessary a result of 3rd.

Quote from: Forze on February 07, 2010, 09:40:20 PM
I could convert a 1000 lines Pawn script in Squirrel with... hmmm 400 lines?
Looking forward to seing it. ;)

Quote from: Forze on February 07, 2010, 09:40:20 PM
Squirrel has much more functions than mIRC and Pawn
Functions entirely depend on what devs implement. They make a required feature in server first and implement a function for calling it in one of the integrated scripting languages (mrc/pawn/sq) second.

Quote from: Forze on February 07, 2010, 09:40:20 PM
and can work along with ini
Pawn's OnGameModeInit replaces ini entirely. What's your point?

Quote from: Forze on February 07, 2010, 09:40:20 PM
hash
Huh?

Quote from: Forze on February 07, 2010, 09:40:20 PM
SQLite and XML
These can be achieved in pawn with the help of plugins like it was done in sa-mp.

Quote from: Forze on February 07, 2010, 09:40:20 PM
In fact, GTA IV:MP is using Squirrel.
And SA-MP uses pawn. While MTA:SA (which is currently the most decent GTA MP imo) uses lua. What's your point?

Quote from: Forze on February 07, 2010, 09:40:20 PM
And we already have a Squirrel Wiki with all the necessary info, including some nice scripting examples.
As I already stated, it is devs to decide the syntax of the functions to call server's features. So it will only be useful if they decide to reproduce your syntax.

Quote from: Forze on February 07, 2010, 09:40:20 PM
There's already an unofficial Squirrel VC:MP server.
There's already sobeit for VC. What's your point again?

Anyway, not meaning to be offensive, but I'm just trying to explain that integrating a new scripting language is rather bothersome, especially if you want it to be "short and easy" which is achieved through making extra build-in functions in server. It is not me to decide, but I do not think that SQ is likely to be implemented in 0.4 since pawn have been out for just a while.


2 Force:

// Squirrel vs Pawn '/c heal' command

//////////////////////////////
///////// VC:MP Pawn /////////
//////////////////////////////

#include <a_vcmp>
#include <util> // FindPlayerIDFromString and other util functions here
public OnPlayerCommandText(playerid, cmdtext[]){
new cmd[256], idx;
cmd = strtok(cmdtext, idx);
if (strcmp(cmd, "heal", true) == 0){
cmd = strtok(cmdtext, idx);
if (!strlen(cmd)) idx = playerid;
else idx = FindPlayerIDFromString(cmd);
if (idx == INVALID_PLAYER_ID) return 1;
if (IsPlayerInAnyVehicle(idx)) SetVehicleHealth(GetPlayerVehicleID(idx),1000.0);
SetPlayerHealth(idx,100.0);
}
return 1;
}

//////////////////////////////
/////// VC:MP Squirrel ///////
//////////////////////////////

function onPlayerCommand( player, cmd, text ){
if ( cmd == "heal" ) {
if ( text ) {
local plr = FindPlayer( text.tointeger() );
if ( plr ) {
if ( plr.Vehicle ) plr.Vehicle.Health = 1000.0;
plr.Health = 100;
}
else Message( "Invalid ID " + text );
}
}
}

Pawn 15 lines (2 of which are includes), SQ 12. Not such a big difference. Sorry, but if you can't optimize scripts it's not devs' fault. :s
Title: Re: Squirrel
Post by: Sephiroth on February 07, 2010, 11:00:55 PM
Quote from: Boss on February 07, 2010, 10:42:37 PM

Quote from: Forze on February 07, 2010, 09:40:20 PM
hash
Huh?

http://en.wikipedia.org/wiki/Hash_table 

<3
Title: Re: Squirrel
Post by: Force on February 07, 2010, 11:02:32 PM
Quote from: Boss on February 07, 2010, 10:42:37 PM
2 Force:

// Squirrel vs Pawn '/c heal' command

//////////////////////////////
///////// VC:MP Pawn /////////
//////////////////////////////

#include <a_vcmp>
#include <util> // FindPlayerIDFromString and other util functions here
public OnPlayerCommandText(playerid, cmdtext[]){
new cmd[256], idx;
cmd = strtok(cmdtext, idx);
if (strcmp(cmd, "heal", true) == 0){
cmd = strtok(cmdtext, idx);
if (!strlen(cmd)) idx = playerid;
else idx = FindPlayerIDFromString(cmd);
if (idx == INVALID_PLAYER_ID) return 1;
if (IsPlayerInAnyVehicle(idx)) SetVehicleHealth(GetPlayerVehicleID(idx),1000.0);
SetPlayerHealth(idx,100.0);
}
return 1;
}

//////////////////////////////
/////// VC:MP Squirrel ///////
//////////////////////////////

function onPlayerCommand( player, cmd, text ){
if ( cmd == "heal" ) {
if ( text ) {
local plr = FindPlayer( text.tointeger() );
if ( plr ) {
if ( plr.Vehicle ) plr.Vehicle.Health = 1000.0;
plr.Health = 100;
}
else Message( "Invalid ID " + text );
}
}
}

Pawn 15 lines (2 of which are includes), SQ 12. Not such a big difference. Sorry, but if you can't optimize scripts it's not devs' fault. :s

That was a heal command that the developers provided with the server not mine.

If you count the function to find the playerID it's a lot longer than Squirrel, and looks horrible to read.

And wow, you did a good job of making an easy to read language, look hard to read. You really messed around with the Squirrel example.
Title: Re: Squirrel
Post by: Boss on February 07, 2010, 11:09:45 PM
Quote from: Sephiroth on February 07, 2010, 11:00:55 PM
http://en.wikipedia.org/wiki/Hash_table 

<3
May I see its usage in VC-MP please?

Quote from: Force on February 07, 2010, 11:02:32 PM
That was a heal command that the developers provided with the server not mine.
Well, yeah, the default mode is actually pretty unoptimized (it does even have two extra includes which are already included in a_vcmp :o). I'm working on a more optimized one.

Quote from: Force on February 07, 2010, 11:02:32 PM
If you count the function to find the playerID it's a lot longer than Squirrel, and looks horrible to read.
You can put all those "horrible functions" in a separate include and forget about them. Actually, SQ does the same, only it puts these functions not in includes, but rather straight into server (making them unchangable). Why didn't VU devs put their function for comparison too? ^^

Quote from: Force on February 07, 2010, 11:02:32 PM
And wow, you did a good job of making an easy to read language, look hard to read. You really messed around with the Squirrel example.
What's wrong with deleting some extra useless "\n"? :s
Title: Re: Squirrel
Post by: Javi on February 07, 2010, 11:14:38 PM
Quote from: Boss on February 07, 2010, 10:42:37 PM
Quote from: Forze on February 07, 2010, 09:40:20 PM
So I keep wondering why developers care about adding Pawn to their new releases
They're not "adding pawn" (which is pretty added already), but rather add the server functionality activated by specific pawn functions (which they implement too).
Oh well, yeah whatever, my point is suggesting to add Squirrel to VC:MP officially.

Quote
Quote from: Forze on February 07, 2010, 09:40:20 PM
or even improving mIRC
Mrc scripting haven't been improved since 0.3z.
Same as my first reply.

Quote
Quote from: Forze on February 07, 2010, 09:40:20 PM
when we all know it's a little laggy
Some samples of pawn being laggy maybe? I've got a 20000 lines script back in sa-mp with an extensive use of file-reading/writing and I don't remember it making any witnessable delays. Check your "laggy" script (if you have one) for unoptimized arrays and loops.
PsySQLite lags sometimes, same as GUS; The best use of mIRC is RustySpoon. Squirrel's deninately much faster.

Quote
Quote from: Forze on February 07, 2010, 09:40:20 PM
It's pretty much faster, easier, and shorter
Already commented on 1st and 2nd is not neccessary a result of 3rd.
So you're agreeing it's faster, easier and shorter then?

Quote
Quote from: Forze on February 07, 2010, 09:40:20 PM
I could convert a 1000 lines Pawn script in Squirrel with... hmmm 400 lines?
Looking forward to seing it. ;)
Nah, I'm not working with Pawn since Squirrel's much better  ;)

Quote
Quote from: Forze on February 07, 2010, 09:40:20 PM
Squirrel has much more functions than mIRC and Pawn
Functions entirely depend on what devs implement. They make a required feature in server first and implement a function for calling it in one of the integrated scripting languages (mrc/pawn/sq) second.
That was not what I meant, I was trying to say how Squirrel servers has much more functions than any Pawn / mIRC script, just because they are easier to make :)

Quote
Quote from: Forze on February 07, 2010, 09:40:20 PM
and can work along with ini
Pawn's OnGameModeInit replaces ini entirely. What's your point?
Oh yeah true that, +1 for Pawn, +5 for Squirrel.

Quote
Quote from: Forze on February 07, 2010, 09:40:20 PM
hash
Huh?
Sephiroth already answered this one.

Quote
Quote from: Forze on February 07, 2010, 09:40:20 PM
SQLite and XML
These can be achieved in pawn with the help of plugins like it was done in sa-mp.
I was just saying how much formats Squirrel can read.

Quote
Quote from: Forze on February 07, 2010, 09:40:20 PM
In fact, GTA IV:MP is using Squirrel.
And SA-MP uses pawn. While MTA:SA (which is currently the most decent GTA MP imo) uses lua. What's your point?
My point is GTA IV is the newest one, and they chose Squirrel, huh why did they choose Squirrel?  :)

Quote
Quote from: Forze on February 07, 2010, 09:40:20 PM
And we already have a Squirrel Wiki with all the necessary info, including some nice scripting examples.
As I already stated, it is devs to decide the syntax of the functions to call server's features. So it will only be useful if they decide to reproduce your syntax.
If they do or not, the wiki's still there, and it definately helped me.

Quote
Quote from: Forze on February 07, 2010, 09:40:20 PM
There's already an unofficial Squirrel VC:MP server.
There's already sobeit for VC. What's your point again?
Suggesting to add Squirrel to VC:MP, as I said before.

Title: Re: Squirrel
Post by: Javi on February 07, 2010, 11:17:29 PM
Sorry for double posting but:

Quote from: Boss on February 07, 2010, 11:09:45 PM
Quote from: Sephiroth on February 07, 2010, 11:00:55 PM
http://en.wikipedia.org/wiki/Hash_table  

<3
May I see its usage in VC-MP please?
A hash is simply faster than an ini.


For example, Squirrel is more object orientated, has classes which are pretty useful, and has pretty fast mathematical stuff and native floats. Could also mention JIT debugging (Just In Time) which you can debug scripts in real time, and the ability to execute script code at runtime. Pawn's string processing slows down the longer the size of the string is apparently.
Title: Re: Squirrel
Post by: Boss on February 07, 2010, 11:25:49 PM
Quote from: Forze on February 07, 2010, 11:14:38 PM
PsySQLite lags sometimes, same as GUS; The best use of mIRC is RustySpoon. Squirrel's deninately much faster.
Aren't they mrc scripts? I thought we're comparing pawn and SQ here. :s

Quote from: Forze on February 07, 2010, 11:14:38 PM
So you're agreeing it's faster, easier and shorter then?
No. You didn't prove that it's faster, I already proved that it's shorter because of the "horrible functions" being implemented straight into the server rather than includes. And, if it is easier, only because of it being "shorter". Though I DO agree that players/vehicles behaving like classes is nice.

Quote from: Forze on February 07, 2010, 11:14:38 PM
Nah, I'm not working with Pawn since Squirrel's much better  ;)
STATEMENT FAILED THEN.

Quote from: Forze on February 07, 2010, 11:14:38 PM
That was not what I meant, I was trying to say how Squirrel servers has much more functions than any Pawn / mIRC script, just because they are easier to make :)
I don't know which language is easier to integrate, but I hope your statement comes from one of VU devs.

Quote from: Forze on February 07, 2010, 11:14:38 PM
Oh yeah true that, +1 for Pawn, +5 for Squirrel.
Um... excuse me?

Quote from: Forze on February 07, 2010, 11:14:38 PM
My point is GTA IV is the newest one, and they chose Squirrel, huh why did they choose Squirrel?  :)
GTA:SA was made by people having full R* support. Huh, why would people knowing the best way to exploit GTA's functionality choose lua?

Quote from: Forze on February 07, 2010, 11:14:38 PM
Suggesting to add Squirrel to VC:MP, as I said before.
Ok, some people added SQ to VC-MP's server. Other people don't have the time to add it. Your point still fails.




Quote from: Forze on February 07, 2010, 11:17:29 PM
A hash is simply faster than an ini.
... with the latter being completely substituded by pawn's OnGameModeInit. I think you're still comparing to mrc.

Quote from: Forze on February 07, 2010, 11:17:29 PM
Squirrel is more object orientated, has classes which are pretty useful
Agreed here.

Quote from: Forze on February 07, 2010, 11:17:29 PM
and has pretty fast mathematical stuff
Speed tests?

Quote from: Forze on February 07, 2010, 11:17:29 PM
Could also mention JIT debugging (Just In Time) which you can debug scripts in real time
How exactly do you want to properly debug a script without even entering the game? :s

Quote from: Forze on February 07, 2010, 11:17:29 PM
Pawn's string processing slows down the longer the size of the string is apparently.
Pawn's strings are fuxxed, agreed here too. Their size should be dynamic rather than pre-determined.
Title: Re: Squirrel
Post by: [AoD]NC on February 07, 2010, 11:33:23 PM
I dont have time to read this nice-looking-conversation but i agree.
SQUIRREL > PAWN
<3
Title: Re: Squirrel
Post by: Javi on February 07, 2010, 11:37:07 PM
Quote from: Boss on February 07, 2010, 11:25:49 PM
Quote from: Forze on February 07, 2010, 11:14:38 PM
PsySQLite lags sometimes, same as GUS; The best use of mIRC is RustySpoon. Squirrel's deninately much faster.
Aren't they mrc scripts? I thought we're comparing pawn and SQ here. :s
mIRC and Pawn in general  :)

Quote
Quote from: Forze on February 07, 2010, 11:14:38 PM
So you're agreeing it's faster, easier and shorter then?
No. You didn't prove that it's faster, I already proved that it's shorter because of the "horrible functions" being implemented straight into the server rather than includes. And, if it is easier, only because of it being "shorter". Though I DO agree that players/vehicles behaving like classes is nice.
I still like Squirrel better.

Quote
Quote from: Forze on February 07, 2010, 11:14:38 PM
Nah, I'm not working with Pawn since Squirrel's much better  ;)
STATEMENT FAILED THEN.
Statement didn't fail at all.

Quote
Quote from: Forze on February 07, 2010, 11:14:38 PM
That was not what I meant, I was trying to say how Squirrel servers has much more functions than any Pawn / mIRC script, just because they are easier to make :)
I don't know which language is easier to integrate, but I hope your statement comes from one of VU devs.
Me neither, Squirrel's still better IMO.

Quote
Quote from: Forze on February 07, 2010, 11:14:38 PM
Oh yeah true that, +1 for Pawn, +5 for Squirrel.
Um... excuse me?
Not literally speaking of course, I meant Squirrel has more scripting chances than Pawn.

Quote
Quote from: Forze on February 07, 2010, 11:14:38 PM
My point is GTA IV is the newest one, and they chose Squirrel, huh why did they choose Squirrel?  :)
GTA:SA was made by people having full R* support. Huh, why would people knowing the best way to exploit GTA's functionality choose lua?
MTA doesn't have full R* support, people have different preferences

Quote
Quote from: Forze on February 07, 2010, 11:14:38 PM
Suggesting to add Squirrel to VC:MP, as I said before.
Ok, some people added SQ to VC-MP's server. Other people don't have the time to add it. Your point still fails.
Nah, it doesn't. Seriously why are you attacking my suggestion like this? Looks like I'm not free to share my opinion.

Quote
Quote from: Forze on February 07, 2010, 11:14:38 PM
A hash is simply faster than an ini.
... with the latter being completely substituded by pawn's OnGameModeInit. I think you're still comparing to mrc.
Oh well, I never said Pawn's OnGameModeInit's worse than Squirrel's method, in fact it's better.


I've got to go now, I hope I get some constructive replies when I come back  :)
Title: Re: Squirrel
Post by: Boss on February 07, 2010, 11:44:47 PM
Quote from: Forze on February 07, 2010, 11:37:07 PM
mIRC and Pawn in general  :)
Mrc scripts are not a part 0.4, so no need to compare them.

Quote from: Forze on February 07, 2010, 11:37:07 PM
Statement didn't fail at all.
Quote from: Forze on February 07, 2010, 09:40:20 PMI could convert a 1000 lines Pawn script in Squirrel with... hmmm 400 lines?
Quote from: Forze on February 07, 2010, 11:14:38 PMNah, I'm not working with Pawn since Squirrel's much better  ;)
"I could but I won't" = fail.

Quote from: Forze on February 07, 2010, 11:37:07 PM
Me neither, Squirrel's still better IMO.
How can you decide that it's better judging by simplicity of its integration if you know nothing about the latter? :s

Quote from: Forze on February 07, 2010, 11:37:07 PM
Not literally speaking of course, I meant Squirrel has more scripting chances than Pawn.
So how exactly is that proven by SQ having ini?

Quote from: Forze on February 07, 2010, 11:37:07 PM
MTA doesn't have full R* support, people have different preferences
It did. And their decision was not about preferences.

Quote from: Forze on February 07, 2010, 11:37:07 PM
Nah, it doesn't. Seriously why are you attacking my suggestion like this? Looks like I'm not free to share my opinion.
If you weren't free to share your opinion, I would ban you. :o I'm just trying to show people the other position so that they don't think they are smarter than VC-MP devs. :s
Title: Re: Squirrel
Post by: Sephiroth on February 08, 2010, 02:23:03 AM
Quote from: Boss on February 07, 2010, 11:44:47 PM
If you weren't free to share your opinion, I would ban you. :o

that's a bit over the line don't ya think? :P

fact is nobody really knew you were a forums moderator before this, so.... 2+2?  ;)
Title: Re: Squirrel
Post by: gta5 on February 08, 2010, 06:34:17 AM
seriously now ... is R2 even compatible with Squirrel atm <.<  ::)
Title: Re: Squirrel
Post by: thijn on February 08, 2010, 08:22:37 AM
It is, but the devs don't like it because its actually some kind of hack for VCMP (server wise)

VC:MP 0.3z r2 Server (Windows x86) (http://vicecitymultiplayer.info/files/VCMPServer-R2.zip)
VC:MP 0.3z r2 Server (Linux x86) (http://vicecitymultiplayer.info/files/VCMPServer-R2.tar.gz)
VC:MP 0.3z r2 mIRC rcon dll (http://vicecitymultiplayer.info/files/vcmpmultidll-r2.zip)
Title: Re: Squirrel
Post by: Ettans on February 08, 2010, 08:41:44 AM
Quote from: Forze on February 07, 2010, 09:40:20 PM
and can work along with ini, hash, SQLite and XML.

So can PAWN. If developers allowed us to create plugins, the functionality could be increased even more.
Title: Re: Squirrel
Post by: Boss on February 08, 2010, 08:44:54 AM
Quote from: Sephiroth on February 08, 2010, 02:23:03 AM
that's a bit over the line don't ya think? :P

fact is nobody really knew you were a forums moderator before this, so.... 2+2?  ;)
"Get you banned" would sound nicer to ya? ;) The point still remains.

Quote from: thijn on February 08, 2010, 08:22:37 AM
VC:MP 0.3z r2 Server (Windows x86) (http://vicecitymultiplayer.info/files/VCMPServer-R2.zip)
VC:MP 0.3z r2 Server (Linux x86) (http://vicecitymultiplayer.info/files/VCMPServer-R2.tar.gz)
VC:MP 0.3z r2 mIRC rcon dll (http://vicecitymultiplayer.info/files/vcmpmultidll-r2.zip)
*Cough*
Title: Re: Squirrel
Post by: [AoD]NC on February 08, 2010, 10:02:59 AM
Boss i guess you have never used Squirrel for scripting. And just a btw. question how long are you playing vcmp? Because e.g. i started when only mirc scripting was available. And in the year 2009 boom VR & co. released the Squirrel server. "Oh yes finally, not longer 2 computers for hosting: 1 for server, 1 for scripts" or "Glad, finally something that is more likely to be like a C or Java language".

And this was a year ago. I have scripted in Squirrel too and i have hundreds of script lines and i know how Squirrel and all other function works so what now i should move to pawn?

QuoteSo how exactly is that proven by SQ having ini?
Ini is something simple that everyone can use it. Cause its easy, always works and for everyone.
Title: Re: Squirrel
Post by: Boss on February 08, 2010, 10:29:30 AM
Quote from: [AoD]NC on February 08, 2010, 10:02:59 AM
Boss i guess you have never used Squirrel for scripting.
Nope. Why would I?

Quote from: [AoD]NC on February 08, 2010, 10:02:59 AM
how long are you playing vcmp?
I started playing GTA MPs long before VC-MP was out and played almost every MP since then (rumble and gtat included :o). And yes, I used ini in the first versions too.

Quote from: [AoD]NC on February 08, 2010, 10:02:59 AM
And in the year 2009 boom VR & co. released the Squirrel server.
Never said anything bad about them. SQ compared to mrc is certainly superior and thanks to VR for providing that alternative. But now pawn is being developed by the devs, maximizing vc-mp's potential.

Quote from: [AoD]NC on February 08, 2010, 10:02:59 AM
"Oh yes finally, not longer 2 computers for hosting: 1 for server, 1 for scripts"
^ lol at those still using mrc. :p

Quote from: [AoD]NC on February 08, 2010, 10:02:59 AM
I have scripted in Squirrel too and i have hundreds of script lines and i know how Squirrel and all other function works so what now i should move to pawn?
Nobody said you will have to put your scripts to waste. You can keep using VR's server for now (not that anyone global-bans you for that lol) till there's official SQ support.

Quote from: [AoD]NC on February 08, 2010, 10:02:59 AM
Ini is something simple that everyone can use it. Cause its easy, always works and for everyone.
OnGameModeInit is not so difficult too really.
Title: Re: Squirrel
Post by: [AoD]NC on February 08, 2010, 11:30:03 AM
QuoteNope. Why would I?
Maybe then you could see why the most ppl that posted in the topic likes Squirrel more then Pawn. Okay you have already scripted in PAWN for a long time so for you its really easy now. But Squirrel is easier anyway :p.

QuoteI started playing GTA MPs long before VC-MP was out and played almost every MP since then (rumble and gtat included Shocked).
:O

QuoteBut now pawn is being developed by the devs, maximizing vc-mp's potential.
Maximizing? What new function are added in R2? Not much, the most of them were already in R1.

Quote^ lol at those still using mrc. :p
Well since there was the possibility to run a script 24h/day using Squirrel i have used it. Then i used only mrc to connect to irc channels not to the server.
Title: Re: Squirrel
Post by: Boss on February 08, 2010, 11:41:13 AM
Quote from: [AoD]NC on February 08, 2010, 11:30:03 AM
Maybe then you could see why the most ppl that posted in the topic likes Squirrel more then Pawn. Okay you have already scripted in PAWN for a long time so for you its really easy now. But Squirrel is easier anyway :p.
I saw the code snippets and I see how that "easiness" is achieved. In the "heal example" the "easy" things are: built-in server functions (FindPlayer), things behaving like classes (plr.Vehicle.Health, plr.Health), extra parameters (onPlayerCommand's "text" parameter saving 1 strtok) and no need for functions's return (?). Though in that sample player can't heal himself (no "else" if text is null) and the Message is shown for everyone (?).

Quote from: [AoD]NC on February 08, 2010, 11:30:03 AM
Maximizing? What new function are added in R2? Not much, the most of them were already in R1.
If you're comparing r2's pawn to r1's mrc, then it's just because r2 was an initial pawn release. It was never intended to have a samp-level functionality right after being integrated. There are really many pawn fixes and additions for the upcoming version - you will see.



P.S. Here's a "proper" SQ's heal function (with the functionality identical to pawn's sample):

//////////////////////////////
/////// VC:MP Squirrel ///////
//////////////////////////////

function onPlayerCommand( player, cmd, text ){
if (cmd == "heal") {
local plr;
if (text) plr = FindPlayer(text.tointeger());
else plr = player;
if (!plr) {}
else {
if (plr.Vehicle) plr.Vehicle.Health = 1000.0;
plr.Health = 100;
}
}
}


12 lines too.
Title: Re: Squirrel
Post by: [AoD]NC on February 08, 2010, 11:48:49 AM
If you want see heres my own heal command for that player, that types it:
 bla bla onplayersmthing
if ( text == "!zycie" || text == "!z" || text == "!heal" ) { //If types cmd
   if ( player.Cash < 300 ) PrivMessage( "Error: You need more money.", player ); //Money...
   else if ( player.Health == 100 ) PrivMessage( "Error: Full health.", player ); //100 HP
   else {
     local money = ( ( 100 - player.Health ) * 3 ).tointeger(); //Pay 3 * how many hp you need
     PrivMessage( "Success . Paid: $" + money + ".", player ); //Msg for player
     player.Health = 100;
     player.Cash -= money;
   }
 }


QuoteIf you're comparing r2's pawn to r1's mrc, then it's just because r2 was an initial pawn release
Oh yeah, and tomorrow will be 0.4?  ::)

Quote12 lines too.
Maybe for other the length of script is important but for me the most important thing is that i know how it works :).
Title: Re: Squirrel
Post by: SilenusShar on February 08, 2010, 11:49:10 AM
This is the most unintelligent discussion i have ever read.


The primary point that seems to be striking across the board is that your all fickle

not one of you have put forward a good point to why squirrel is better apart from it look more beautiful...? what the heck....

if someone was to post some solid evidence (speed tests maybe) to how it can perform better than pawn then you might alleviate yourselves from looking like complete lemmings.


Just because I say the sky is yellow, does that mean it is...?
Title: Re: Squirrel
Post by: Boss on February 08, 2010, 11:56:25 AM
Quote from: [AoD]NC on February 08, 2010, 11:48:49 AM
Maybe for other the length of script is important but for me the most important thing is that i know how it works :).
Quote from: Forze on February 07, 2010, 09:40:20 PM
I could convert a 1000 lines Pawn script in Squirrel with... hmmm 400 lines?

Quote from: SilenusShar on February 08, 2010, 11:49:10 AM
This is the most unintelligent discussion i have ever read.
^

Quote from: SilenusShar on February 08, 2010, 11:49:10 AM
not one of you have put forward a good point to why squirrel is better apart from it look more beautiful...? what the heck....
I have figured some points of its "beautifulness" (in my previous post), though most of them are rather contradictive.
Title: Re: Squirrel
Post by: Javi on February 08, 2010, 12:04:47 PM
I don't really get your point SilenusShar.

Avoiding all this kind of replies, haven't you read everyone above my second reply? They all agreed, and looks like they all love Squirrel :)

I was just asking for an official Squirrel support on VC:MP, nothing else; I didn't start talking about Pawn or mIRC in that way.

And Boss, if you didn't like the first "/c heal" example, here you have a new one.
function onPlayerCommand( player, cmd, text )
{
if ( cmd == "heal" ) {
local cost = ( 500 - player.Health );

if ( player.Health  == 100 ) PrivMessage( "Error - you don't need to heal.", player );
else if ( player.Cash < cost ) PrivMessage( "Error - you need at least $" + cost + " to heal.", player );
else if ( player.IsSpawned ) {
player.Health = 100;
Announce( "~h~Healing...", player );
PrivMessage( "You have been healed, cost: $" + cost , player );
player.Cash -= cost;
}
else PrivMessage( "Error - you need to spawn to use this command.", player );
}
}


Would you mind to post here an advanced healing command for Pawn?
Title: Re: Squirrel
Post by: SilenusShar on February 08, 2010, 12:08:53 PM
Quote from: Forze on February 08, 2010, 12:04:47 PM
Avoiding all this kind of replies, haven't you read everyone above my second reply? They all agreed, and looks like they all love Squirrel :)

yes, i have read them all. they haven't posted a valid reason to why its better. (apart from it looks more beautiful)

I’m sat on the fence here as there’s no solid evidence either way.

if all the squirrel "lemmings" asked a squirrel scripter to create and post a simple speed procedure for us to compare it against pawn this would back up their claims that "its better"
Title: Re: Squirrel
Post by: Javi on February 08, 2010, 12:16:17 PM
So, do you really think I'm suggesting to add Squirrel officially because it's... more beautiful? Can any developer please post here? I think it's the best way of knowing what's gonna be done.
Title: Re: Squirrel
Post by: Boss on February 08, 2010, 12:18:54 PM
Quote from: Forze on February 08, 2010, 12:04:47 PM
Avoiding all this kind of replies, haven't you read everyone above my second reply? They all agreed, and looks like they all love Squirrel :)
That's called "tribe instinct" I think.

Quote from: Forze on February 08, 2010, 12:04:47 PM
I was just asking for an official Squirrel support on VC:MP, nothing else; I didn't start talking about Pawn or mIRC in that way.
Quote from: Forze on February 07, 2010, 09:40:20 PM
I could convert a 1000 lines Pawn script in Squirrel with... hmmm 400 lines?

Quote from: Forze on February 08, 2010, 12:04:47 PM
if you didn't like the first "/c heal" example
Um... I'm not geek enough to like scripts. :s I can only judge them my optimization and effectiveness. The previous SQ sample was not effective for comparison with pawn's function since it didn't even reproduce all its features.

Quote from: Forze on February 08, 2010, 12:04:47 PM
Would you mind to post here an advanced healing command for Pawn?

#include <a_vcmp>
#include <util> // GetPlayerHealth2, COLOR_YELLOW and other the other util stuff here
public OnPlayerCommandText(playerid, cmdtext[]){
new cmd[256], idx, cost = 500 - GetPlayerHealth2(playerid), money = GetPlayerMoney(playerid);
cmd = strtok(cmdtext, idx);
if (strcmp(cmd, "heal", true) == 0){
if(GetPlayerHealth2(playerid) == 100) SendClientMessage(playerid,COLOR_YELLOW,Error - you don't need to heal.")
else if (money < cost) SendClientMessage(playerid,COLOR_YELLOW,Error - you need about 500$.")
else (IsPlayerSpawned(playerid)){
SetPlayerHealth(playerid,100);
SendClientMessageToAll(COLOR_YELLOW,"Someone has been healed.")
SendClientMessage(playerid,COLOR_YELLOW,"You have been healed, cost: about 500$.")
SetPlayerMoney(playerid,money-cost);
}
else SendClientMessage(playerid,COLOR_YELLOW,"Error - you need to spawn to use this command.")
}
return 1;
}


Quote from: Forze on February 08, 2010, 12:16:17 PM
Can any developer please post here? I think it's the best way of knowing what's gonna be done.
We're discussing not what gonna be done, but why it's gotta be done, no?
Title: Re: Squirrel
Post by: SilenusShar on February 08, 2010, 12:20:26 PM
Quote from: Forze on February 08, 2010, 12:16:17 PM
So, do you really think I'm suggesting to add Squirrel officially because it's... more beautiful? Can any developer please post here? I think it's the best way of knowing what's gonna be done.

sorry, but you squirrel people haven't made a good job of puting your point across. literally no evidence to back up your claims.

do you expect to walk into Microsoft and say "im a world class programmer" and expect them to employ you without proving it...?
Title: Re: Squirrel
Post by: Javi on February 08, 2010, 12:23:55 PM
Quote from: Boss on February 08, 2010, 12:18:54 PM
Quote from: Forze on February 08, 2010, 12:04:47 PM
Avoiding all this kind of replies, haven't you read everyone above my second reply? They all agreed, and looks like they all love Squirrel :)
That's called "tribe instinct" I think.
* Cough * I don't think that's a "tribe instinct" like you say.

Quote
Quote from: Forze on February 08, 2010, 12:04:47 PM
I was just asking for an official Squirrel support on VC:MP, nothing else; I didn't start talking about Pawn or mIRC in that way.
Quote from: Forze on February 07, 2010, 09:40:20 PM
I could convert a 1000 lines Pawn script in Squirrel with... hmmm 400 lines?
I was just saying Squirrel can be scripted with less lines, and same / better structure / power.

Quote
Quote from: Forze on February 08, 2010, 12:04:47 PM
if you didn't like the first "/c heal" example
Um... I'm not geek enough to like scripts. :s I can only judge them my optimization and effectiveness. The previous SQ sample was not effective for comparison with pawn's function since it didn't even reproduce all its features.
So that's why I asked you the following question.

Quote
Quote from: Forze on February 08, 2010, 12:04:47 PM
Would you mind to post here an advanced healing command for Pawn?
Laterz. :p
I'm looking forward to it  :)
Title: Re: Squirrel
Post by: SilenusShar on February 08, 2010, 12:29:23 PM
Quote
I was just saying Squirrel can be scripted with less lines, and same / better structure / power.

why is less lines necessarily better. a speed test would back up that claim.

maybe pawn has a better way of parsing strings, or vice versa, nether the less, simply stating these things and getting other people "lemmings" i call them, to post and back you up simply make this whole discussion look juvenile.
Title: Re: Squirrel
Post by: Boss on February 08, 2010, 12:30:51 PM
Quote from: Forze on February 08, 2010, 12:23:55 PM
I was just saying Squirrel can be scripted with less lines, and same / better structure / power.
You were saying that the ratio is 5 to 2, so every 5 lines of pawn code can be substituted with 2 lines of SQ. You didn't prove it so far.

Quote from: Forze on February 08, 2010, 12:23:55 PM
I'm looking forward to it  :)
Look backward to it. :o
18 lines pawn, 14 lines SQ.
Title: Re: Squirrel
Post by: Javi on February 08, 2010, 12:33:34 PM
Quote from: Boss on February 08, 2010, 12:30:51 PM
Quote from: Forze on February 08, 2010, 12:23:55 PM
I was just saying Squirrel can be scripted with less lines, and same / better structure / power.
You were saying that the ratio is 5 to 2, so every 5 lines of pawn code can be substituted with 2 lines of SQ. You didn't prove it so far.
Still waiting for your Pawn healing script to prove it.

Quote
Quote from: Forze on February 08, 2010, 12:23:55 PM
I'm looking forward to it  :)
Look backward to it. :o
[/quote]
Erm...
Title: Re: Squirrel
Post by: Boss on February 08, 2010, 12:35:21 PM
Quote from: Forze on February 08, 2010, 12:33:34 PM
Still waiting for your Pawn healing script to prove it.
Erm...
*sigh*
Look at the post above.
Title: Re: Squirrel
Post by: Javi on February 08, 2010, 12:43:15 PM
Quote from: Boss on February 08, 2010, 12:35:21 PM
Quote from: Forze on February 08, 2010, 12:33:34 PM
Still waiting for your Pawn healing script to prove it.
Erm...
*sigh*
Look at the post above.
Sorry, I didn't read it   :-[
Anyways Squirrel is still shorter, I'm currently uploading a video to show off the difference between an empty Squirrel server and a mIRC one, too bad I haven't seen any VC:MP Pawn server echoing  :)

EDIT: http://www.youtube.com/watch?v=GML3aCNiJ2A (http://www.youtube.com/watch?v=GML3aCNiJ2A)
Title: Re: Squirrel
Post by: Boss on February 08, 2010, 12:50:18 PM
Quote from: Forze on February 08, 2010, 12:43:15 PM
Anyways Squirrel is still shorter
Not 5 to 2. You're desperatly looking for facts supporting your position, finding all but relevant ones.

Quote from: Forze on February 08, 2010, 12:43:15 PM
I'm currently uploading a video to show off the difference between an empty Squirrel server and a mIRC one
A video showing a difference between scripting languages? :/

Quote from: Forze on February 08, 2010, 12:43:15 PM
too bad I haven't seen any VC:MP Pawn server echoing  :)
*double sigh*
How is echoing useful? Plus, you can make an echoing application via the pawn functions currently present. Even integrate it in IRC if you wish.

Quote from: Forze on February 08, 2010, 12:43:15 PM
EDIT: http://www.youtube.com/watch?v=GML3aCNiJ2A (http://www.youtube.com/watch?v=GML3aCNiJ2A)
*facepalm*
Title: Re: Squirrel
Post by: Javi on February 08, 2010, 12:53:38 PM
Quote from: Boss on February 08, 2010, 12:50:18 PM
Quote from: Forze on February 08, 2010, 12:43:15 PM
Anyways Squirrel is still shorter
Not 5 to 2. You're desperatly looking for facts supporting your position, finding all but relevant ones.
Not 5 to 2, but it's still shorter! What else do you want?

Quote
Quote from: Forze on February 08, 2010, 12:43:15 PM
I'm currently uploading a video to show off the difference between an empty Squirrel server and a mIRC one
A video showing a difference between scripting languages? :/
It's showing how Squirrel is faster than mIRC, look at the post below, I know what you're gonna say about.

Quote
Quote from: Forze on February 08, 2010, 12:43:15 PM
too bad I haven't seen any VC:MP Pawn server echoing  :)
*double sigh*
How is echoing useful? Plus, you can make an echoing application via the pawn functions currently present. Even integrate it in IRC if you wish.

Echoing allows admin to check the server without playing in it and comunicate with players by the same way.
Title: Re: Squirrel
Post by: SilenusShar on February 08, 2010, 12:58:24 PM
Just so you know, im not on either side. im actually quite interested into which is better too.


So far you've stated that squirrel is;


faster - no evidence to back this claim up (post a speed procedure for us to test that and compare it against pawn)

easier, and shorter - seen a little evidence to back that up

Squirrel has much more functions than mIRC and Pawn - no evidence to back this claim up

can work along with ini, hash, SQLite and XML - that’s an incorrect statement (that’s built into VRockers server not a part of the squirrel language)

more beautiful - well, that’s just lame.


if i've missed any points out, please add them. but so far you've posted no catagoric evidence to back up most of what you've claimed
Title: Re: Squirrel
Post by: Boss on February 08, 2010, 01:00:01 PM
Quote from: Forze on February 08, 2010, 12:53:38 PM
Not 5 to 2, but it's still shorter!
How does saving few extra lines make one scripting language better than the other?

Quote from: Forze on February 08, 2010, 12:43:15 PM
It's showing how Squirrel is faster than mIRC, look at the post below, I know what you're gonna say about.
I know nothing about how IRC support is implemented, BUT:
1) The delay may be just for the writer, not for the server.
2) I don't see how 1s delay makes "admin ckecking" impossible.
3) We're still comparing pawn to SQ, since mrc will not be present in future releases.

P.S. mIRC is an IRC client. Protocol is called IRC and the scripting language is MRC. I don't see how a client can be faster than a scripting language.

Quote from: Forze on February 08, 2010, 12:43:15 PM
Echoing allows admin to check the server without playing in it and comunicate with players by the same way.
MTA, where art thou?


Quote from: SilenusShar on February 08, 2010, 12:58:24 PM
Squirrel has much more functions than mIRC and Pawn - no evidence to back this claim up
No evidence can be found here, since functionality depends entirely on developers. They can as well implement SQ with just one function avaliable.
Title: Re: Squirrel
Post by: Javi on February 08, 2010, 01:08:33 PM
OK so I better don't waste my time trying to prove something and getting more and more replies about it, the thing is everyone who posted here but Boss, and apparently SilenusShar like Squirrel better than any of the current available scripting languages. From now on I'd like to stop comparing them, looks like they are looking equal both Squirrel and Pawn, mIRC has been discarted already. I've not probed Squirrel is better, I've just gotten than Squirrel = Pawn so far. Please can now any developer post here about my suggestion? I think we've got the why already.
Title: Re: Squirrel
Post by: SilenusShar on February 08, 2010, 01:08:40 PM
the problem is, one person will make a statement, and the others fall for it hook line and sinker.

for example, GUS (mIRC) worked brilliantly for me, nice and fast, as did PsySQLite, FBS and WSV. but someone will make a remark and for some reason (i can only assume their own brains haven't fully developed) they will believe that person and not test the claim themselves.

VC:MP is just a fanstsy for kids at the moment, and untill there are some more mature people about this will always be the case.

Quote
everyone here likes squirrel

those people are just "lemmings" YOU MUST POST EVIDENCE to back up your claims.
Title: Re: Squirrel
Post by: Boss on February 08, 2010, 01:13:31 PM
Quote from: Forze on February 08, 2010, 01:08:33 PM
everyone who posted here but Boss, and apparently SilenusShar like Squirrel better
You're still missing my point (after 3 pages... jeez). I do not say that SQ is bad and does not deserve existance. I'm saying that it's not so much better than pawn for devs to abandond all the fixes/improvements and go add SQ support. If you want yo use SQ "here and now" - go use the "hacked" server.

Quote from: Forze on February 08, 2010, 01:08:33 PM
looks like they are looking equal both Squirrel and Pawn
Some parts of native SQ syntax are better than those of pawn. Though haven't heard of SQ supporting filterscripts/plugins.

Quote from: Forze on February 08, 2010, 01:08:33 PM
Please can now any developer post here about my suggestion? I think we've got the why already.
If you're still missing the whole point of the discussion, please ask straight away what do you want to hear from devs apart from everything I've already said. I will gladly add anything I've missed.


Quote from: SilenusShar on February 08, 2010, 01:08:40 PM
VC:MP is just a fanstsy for kids at the moment, and untill there are some more mature people about this will always be the case.
As a matter of fact, there are more mature people here than in SA-MP. At least from what I've seen.
Title: Re: Squirrel
Post by: Javi on February 08, 2010, 01:21:52 PM
I'm not going to use the "hacked" server in that way, since we've no official support to it.

So once you're deleting mIRC scripts from VC:MP, why don't you add the best ones? Squirrel and Pawn would do a very nice combination actually  :)
Title: Re: Squirrel
Post by: Boss on February 08, 2010, 01:24:09 PM
Quote from: Forze on February 08, 2010, 01:21:52 PM
So once you're deleting mIRC scripts from VC:MP, why don't you add the best ones? Squirrel and Pawn would do a very nice combination actually  :)
The addition of an official SQ support to VC-MP was never declined. Just not for the upcoming version.
Title: Re: Squirrel
Post by: Javi on February 08, 2010, 01:25:26 PM
Quote from: Boss on February 08, 2010, 01:24:09 PM
Quote from: Forze on February 08, 2010, 01:21:52 PM
So once you're deleting mIRC scripts from VC:MP, why don't you add the best ones? Squirrel and Pawn would do a very nice combination actually  :)
The addition of an official SQ support to VC-MP was never declined. Just not for the upcoming version.
That's very nice to hear then, hope R3 / 0.4 use Squirrel  :)
Title: Re: Squirrel
Post by: Boss on February 08, 2010, 01:27:34 PM
Quote from: Forze on February 08, 2010, 01:25:26 PM
That's very nice to hear then, hope R3 / 0.4 use Squirrel  :)
*sigh*
r3/0.4 IS an upcoming version.
Title: Re: Squirrel
Post by: Javi on February 08, 2010, 01:36:23 PM
Quote from: Boss on February 08, 2010, 01:27:34 PM
Quote from: Forze on February 08, 2010, 01:25:26 PM
That's very nice to hear then, hope R3 / 0.4 use Squirrel  :)
*sigh*
r3/0.4 IS an upcoming version.
At least there's a chance of it releasing. Can I know of a reason to let me know why it's not coming with R3 / 0.4 ?
Title: Re: Squirrel
Post by: Boss on February 08, 2010, 01:38:17 PM
Quote from: Forze on February 08, 2010, 01:36:23 PM
At least there's a chance of it releasing. Can I know of a reason to let me know why it's not coming with R3 / 0.4 ?
Man, I'm already tired of repeating you all the same things. Developers are busy with other fixes/features at the moment, plus they want to release quicker.

But, of course, if you're willing to wait for another two years...
Title: Re: Squirrel
Post by: Obentinus on February 08, 2010, 02:03:14 PM
why is there a topic about a none VC:MP server here ?

why don't you get out of these forums if you want squirrel, and make a forum of your own, like VCO's

THIS IS FOR VC:MP, and no other mods, so f*ck off with your hacky, crapy, shite.
Title: Re: Squirrel
Post by: Boss on February 08, 2010, 02:06:39 PM
Quote from: Obentinus on February 08, 2010, 02:03:14 PM
why is there a topic about a none VC:MP server here ?

why don't you get out of these forums if you want squirrel, and make a forum of your own, like VCO's

THIS IS FOR VC:MP, and no other mods, so f*ck off with your hacky, crapy, shite.
This topic is not about any server, it is about officially adding Squirrel support in VC-MP.
Title: Re: Squirrel
Post by: SilenusShar on February 08, 2010, 02:36:35 PM


not to be pedantic /me points to the top of the forum

News: VC:MP 0.3z is released! http://vicecitymultiplayer.com

anyway, the squirrel lot need to put some evidence forward. code us some speed tests for us to compare with pawn.

you may be naive enough to do so but im not believing any rubbish without seeing evidence first.
Title: Re: Squirrel
Post by: [AoD]NC on February 08, 2010, 04:25:59 PM
Quotecode us some speed tests for us to compare with pawn.
And what will be the difference? 5 ms? Is that good enough to say that this or this is better?
Title: Re: Squirrel
Post by: Boss on February 08, 2010, 04:35:43 PM
Quote from: [AoD]NC on February 08, 2010, 04:25:59 PM
And what will be the difference? 5 ms? Is that good enough to say that this or this is better?
Exactly.

Weren't you supposed to be on Squirrel side btw? :p
Title: Re: Squirrel
Post by: [AoD]NC on February 08, 2010, 04:37:31 PM
Quote from: Boss on February 08, 2010, 04:35:43 PM
Quote from: [AoD]NC on February 08, 2010, 04:25:59 PM
And what will be the difference? 5 ms? Is that good enough to say that this or this is better?
Exactly.

Weren't you supposed to be on Squirrel side btw? :p
I am but 5 ms is nothing for me :O.
Title: Re: Squirrel
Post by: SilenusShar on February 08, 2010, 05:19:26 PM
Quote from: [AoD]NC on February 08, 2010, 04:25:59 PM
And what will be the difference? 5 ms? Is that good enough to say that this or this is better?

Yes, wont be much, but they claim its faster than pawn. but surely you would want proof of that..?

anyway, its not my decision.
Title: Re: Squirrel
Post by: Ettans on February 08, 2010, 07:45:13 PM
With the maximum player count being 50 in VC:MP, the speed-difference of Squirrel and PAWN don't matter. It'd only make a difference if the server had 100-200+ players.

To the players who say "PAWN is better", "Squirrel is better!": At least have some decency to post proof, benchmarks etc. Every computer language has its cons and pros, but comparing them is plain dumb. Every language outperforms another language in a certain area.
Title: Re: Squirrel
Post by: Javi on February 08, 2010, 08:06:12 PM
Oh well, here's the speedtest anyways:

The scripts do the same operation, which is calculate a distance between 2 random 3d coordinates. It does the operation 500 times to give more accurate timings.

The code for both is here:

// Pawn

#include <a_vcmp>

main()
{
}



public OnGameModeInit()
{
new counter = GetTickCount();
new Float:distance = 0.0;
new output[ 128 ];
for ( new i = 0; i < 500; i++ )
{
CalculateDistance( distance, random( 2500 ), random( 2500 ), random( 2500 ), random( 2500 ), random( 2500 ), random( 2500 ) );
format( output, sizeof( output ), "Distance: %f", distance );
print( output );
}
new totalTime = GetTickCount() - counter;
format( output, sizeof( output ), "Time taken: %i", totalTime );
print( output );
return 1;
}

public CalculateDistance( &Float:ret, Float:x1, Float:y1, Float:z1, Float:x2, Float:y2, Float:z2 )
{
ret = floatsqroot( ( ( x2-x1 ) * (x2-x1) ) + ( (y2-y1) * (y2-y1) ) + ( (z2-z1)*(z2-z1) ) );
return 1;
}

// Squirrel
function onScriptLoad( )
{
local counter = GetTickCount();
for ( local i = 0; i < 500; ++i )
{
print( "Distance: " + CalculateDistance( rand() % 2500, rand() % 2500, rand() % 2500, rand() % 2500, rand() % 2500, rand() % 2500 ) );
}
local timeTaken = GetTickCount() - counter;
print( "Time Taken: " + timeTaken );
}

function CalculateDistance( x1, y1, z1, x2, y2, z2 )
{
return sqrtf( ( ( x2-x1 ) * (x2-x1) ) + ( (y2-y1) * (y2-y1) ) + ( (z2-z1)*(z2-z1) ) );
}


And here's the result:
(http://img215.imageshack.us/img215/6267/pawnsqfloat.th.jpg) (http://img215.imageshack.us/i/pawnsqfloat.jpg/)

The times are in milliseconds. Shows how squirrel excels in floating point operations :)
Title: Re: Squirrel
Post by: SilenusShar on February 08, 2010, 08:10:33 PM
lol...would the real slim shady please stand up!
Title: Re: Squirrel
Post by: Boss on February 08, 2010, 08:42:54 PM
Quote from: Forze on February 08, 2010, 08:06:12 PM
The times are in milliseconds. Shows how squirrel excels in floating point operations :)
SQ IS 20 MS FASTER??? OMG OMG/me runs to switch to Squirrel.

Btw, Pawn spends extra time for string formatting. You also calculate sizeof(output) each time for some reason. :s

EDIT: That Pawn sample takes 200-270 ms for me to complete. How many computers are in your grid? :o

EDIT2: Removed the distance output. Now it takes 0 ms to complete. Your point about "fast float operations" fails.
Title: Re: Squirrel
Post by: [AoD]NC on February 08, 2010, 08:48:48 PM
This discussion is more and more pointless ;x. What was the orginal idea of this topic?

For some ppl squirrel is better, and for some Pawn and nobody cant change it :).
Title: Re: Squirrel
Post by: SilenusShar on February 08, 2010, 09:54:37 PM
well, whoever the real coder is, they certainly did a good job in the end. why did it take them 5 pages though... :/

EDIT:
the topic was a request for squirrel in VC:MP. a dev needs to test that and then decide.


EDIT2:
Surely a better approach to your problem would be to create a topic stating the reasons you think squirrel is better then pawn, and why, providing evidence (just like you did above) where necessary.
Title: Re: Squirrel
Post by: Skirmant on February 08, 2010, 10:52:48 PM
And the winner is... *DRUM ROLL*
NONE! You guys wasted 5 pages on pointless arguing!

BTW! Pawno and Squirrel sucks! *Runs away*
Title: Re: Squirrel
Post by: thijn on February 08, 2010, 11:01:09 PM
At this stage (As the servers are right now) squirrel has a lot more functions then the Pawno server. Although I hope the pawno server will atleast support plugins and more of these "basic" functions.
Title: Re: Squirrel
Post by: Boss on February 08, 2010, 11:06:39 PM
Quote from: thijn on February 08, 2010, 11:01:09 PM
squirrel has a lot more functions then the Pawno server
May we have a list please?
Title: Re: Squirrel
Post by: SilenusShar on February 08, 2010, 11:21:55 PM
thijn, learn this lesson in life. (or not, its up to you)

if you want to get your point accross to someone, make it a habbit to backup ALL claims/statistics you make with evidence.

E.g. if your quoting to the president that 23% of all americans wear blue socks, you must be sure this figure is accurate, providing solid proof to back it up.


ps, if that example is not close enough to home for you, i'll re explain with an example that is taylor made for you. :-)
Title: Re: Squirrel
Post by: gta5 on February 08, 2010, 11:47:57 PM
I don't see the point of this topic, it's obvious that no one here are going to be persuaded one way or the other. Just use whatever method you prefer  :-* For me that's mirc ;D and I have few problems with lag. Yes, the scripts are on a separate pc than the server but that's not a problem.
Title: Re: Squirrel
Post by: Boss on February 08, 2010, 11:57:23 PM
Quote from: gta5 on February 08, 2010, 11:47:57 PM
Yes, the scripts are on a separate pc than the server but that's not a problem.
Maybe no mrc support will be a good enough problem for you?
Title: Re: Squirrel
Post by: gta5 on February 09, 2010, 12:04:05 AM
ya it would be but I don't need to worry about that yet  ::) sure it will eventually become unusable with vcmp or w/e but by the time it becomes unusable I probably won't be playing this, anyway I doubt it will become unusable in the near future and in my opinion there's no reason to cut off someone's resources for the sake of a few seconds lag.

Also, I have no reason to believe that mirc won't work all I have to base that on is your word
Title: Re: Squirrel
Post by: Boss on February 09, 2010, 12:27:02 AM
Quote from: gta5 on February 09, 2010, 12:04:05 AM
ya it would be but I don't need to worry about that yet  ::) sure it will eventually become unusable with vcmp or w/e but by the time it becomes unusable I probably won't be playing this, anyway I doubt it will become unusable in the near future and in my opinion there's no reason to cut off someone's resources for the sake of a few seconds lag.

Also, I have no reason to believe that mirc won't work all I have to base that on is your word
You do understand that you're rather naïve, don't you?
Title: Re: Squirrel
Post by: gta5 on February 09, 2010, 12:58:28 AM
I love you too  :-*

Title: Re: Squirrel
Post by: Jc18 on February 09, 2010, 01:19:41 AM
give what the ppl want!

anyway mirc > pawn,squirrel
Title: Re: Squirrel
Post by: Windlord on February 09, 2010, 02:05:40 AM
A game modification is created to increase the playability of the original game.
The end result must be user-friendly and most certainly scripters should not be made to spend time trying to write overly complicated scripts.

Squirrel uses pointers and objects making scripts immensely simple and intuitive.
It is also extremely easy for diligent developers to add in features such as sockets, sqlite, inis, and hash tables without the community having to go through the procedure of creating a less efficient plug-in for them.
Pawn however requires add-ons, numerous functions and a lot of crunching to deliver the same experience.
(btw, did you know that Pawn was never meant for games?  :o)

The heal command supplies every evidence you need to prove that Squirrel is more efficient and is more newb friendly.
What you need to know is that Squirrel doesn't need any "includes" for its simple commands. Pointers and objects are integrated into the language itself.
Force's script shows the amount of code you require to run a server with a single !heal command in it.
Squirrel does not need anything more than a few lines.
Pawn needs all of the hassle of creating inefficient commands.
(Yes, they are inefficient since a pointer points directly at a player's data and does not loop through dozens of other players)

Back to the first point I made about intuitive and easy languages...
If you were looking for a mod for GTA:MP to script for,
and each mod had the same condition except for the fact that they used different languages,
which language would you choose?

For me, it would definitely be Squirrel as I'd waste less time trying to make things work and create thing which actually do work without too much effort.

Boss:
QuoteDon't even think of replying to my post, your replies are useless and extremely kiss-arse-y ;)
If you don't see how Squirrel is better, it's your problem as you don't even give a damn and won't even try it out!

SilenusShar:
QuoteIf you want evidence visit the unofficial forums and take a look at a Squirrel script. Then go to a samp forum and take a look at a pawn script.

The main reason no one bothers uploading benchmarks is because it's pointless.
Most of us can see that Squirrel is a faster and easier language for vcmp :)
Title: Re: Squirrel
Post by: Boss on February 09, 2010, 02:36:04 AM
Quote from: Windlord on February 09, 2010, 02:05:40 AM
Don't even think of replying to my post
Try to stop me.

Quote from: Windlord on February 09, 2010, 02:05:40 AM
your replies are useless
Yeah, sorry for not posting "+1 Forze", "SQ rules though I don't know what it is" and "look, I can't script in pawn!". I guess I just don't have a rich enough scripting experience.

Quote from: Windlord on February 09, 2010, 02:05:40 AM
extremely kiss-arse-y ;)
Excuse me?

Quote from: Windlord on February 09, 2010, 02:05:40 AM
If you don't see how Squirrel is better, it's your problem as you don't even give a damn and won't even try it out!
Good sir, it is my firm belief that you experience a certain difficulty reading/understanding my posts. I have already mentioned:
1. Few advantages of SQ over Pawn.
2. My interest in SQ as a consequence of 1.
3. A possibility of a future SQ implementation.
All of these contradict with your statement, quoted above. Please re-read my previous posts to avoid further misunderstandings.

Quote from: Windlord on February 09, 2010, 02:05:40 AM
scripters should not be made to spend time trying to write overly complicated scripts.
Out of all the things mentioned in this topic, Pawn's complexity was never proven.

Quote from: Windlord on February 09, 2010, 02:05:40 AM
Squirrel uses pointers and objects making scripts immensely simple and intuitive.
This has already been mentioned (even by me), thanks.

Quote from: Windlord on February 09, 2010, 02:05:40 AM
It is also extremely easy for diligent developers
*cough*

Quote from: Windlord on February 09, 2010, 02:05:40 AM
Pawn however requires add-ons, numerous functions and a lot of crunching to deliver the same experience.
SQ requires all the same, only it is done by devs and is largery hard-coded.

Quote from: Windlord on February 09, 2010, 02:05:40 AM
(btw, did you know that Pawn was never meant for games?  :o)
Same for lua, so?

Quote from: Windlord on February 09, 2010, 02:05:40 AM
The heal command supplies every evidence you need to prove that Squirrel is more efficient and is more newb friendly.
It doesn't, read the 1st page of this topic more carefully.

Quote from: Windlord on February 09, 2010, 02:05:40 AM
What you need to know is that Squirrel doesn't need any "includes" for its simple commands.
"Its" simple commands? Does every SQ come with FindPlayer()?

Quote from: Windlord on February 09, 2010, 02:05:40 AM
Pointers and objects are integrated into the language itself.
Thanks for reminding again.

Quote from: Windlord on February 09, 2010, 02:05:40 AM
Force's script shows the amount of code you require to run a server with a single !heal command in it.
Do you know many scripts running a single !heal command in them?

Quote from: Windlord on February 09, 2010, 02:05:40 AM
Squirrel does not need anything more than a few lines.
Do you know any playable script taking a few lines?

Quote from: Windlord on February 09, 2010, 02:05:40 AM
Pawn needs all of the hassle of creating inefficient commands.
Which devs, instead of hard-coding into server, can just place into one include for scripters to be able to modify them. Your point fails.

Quote from: Windlord on February 09, 2010, 02:05:40 AM
(Yes, they are inefficient since a pointer points directly at a player's data and does not loop through dozens of other players)
Which Pawn's "inefficient command" exactly loops through dozens of other players?

Quote from: Windlord on February 09, 2010, 02:05:40 AM
each mod had the same condition
Not true.

Quote from: Windlord on February 09, 2010, 02:05:40 AM
which language would you choose?
The one you have more experience in. And many players come after sa-mp.

Quote from: Windlord on February 09, 2010, 02:05:40 AM
For me, it would definitely be Squirrel as I'd waste less time trying to make things work and create thing which actually do work without too much effort.
Pawn never required too much effort and the fact you're stating haven't been proven for the past 5 pages. If you have a way to prove it which is better than a failed heal example - please post.

Quote from: Windlord on February 09, 2010, 02:05:40 AM
The main reason no one bothers uploading benchmarks is because it's pointless.
Most of us can see that Squirrel is a faster and easier language for vcmp :)
And I thought obvious things are easy to prove.
Title: Re: Squirrel
Post by: Squida on February 09, 2010, 04:52:14 AM
If you guys are ready to admit that squirrel has its pros and cons just like pawn then is it such a big deal in having others use it, even if you prefer not to?


The big picture is that this is just a game and going to such lengths for the sake of an arguement is just downright 'stoopid'.
Title: Re: Squirrel
Post by: ULK.akiharu on February 09, 2010, 07:06:22 AM
Point of Inquiry:

Boss, are you part of the VC:MP dev team?
Title: Re: Squirrel
Post by: gta5 on February 09, 2010, 07:20:34 AM
yea I don't really see why he says things like mirc scripting will be discontinued shortly without providing any proof/evidence.
Title: Re: Squirrel
Post by: Ettans on February 09, 2010, 08:06:29 AM
Quote from: Windlord on February 09, 2010, 02:05:40 AM
A game modification is created to increase the playability of the original game....

Finally someone who actually knows what they're talking about. Unlike certain people here, who post "+1 son" or go all fan-boy, without taking something into consideration. So, yes. Squirrel IS faster AND more effective. The reason this thread has turned into a flaming hole, is due to the reason that some people are used to PAWN and some to Squirrel, so they don't want to switch, but look at the bigger picture, Squirrel would be better for VC:MP.
Title: Re: Squirrel
Post by: Boss on February 09, 2010, 08:43:45 AM
Quote from: Squida on February 09, 2010, 04:52:14 AM
If you guys are ready to admit that squirrel has its pros and cons just like pawn then is it such a big deal in having others use it, even if you prefer not to?
I suppose it is assumed that only one can be used.

Quote from: Squida on February 09, 2010, 04:52:14 AM
The big picture is that this is just a game and going to such lengths for the sake of an arguement is just downright 'stoopid'.
Arguing is fun. ^^

Quote from: ULK.akiharu on February 09, 2010, 07:06:22 AM
Boss, are you part of the VC:MP dev team?
Nope. Did I say anything out of my field of competence?

Quote from: gta5 on February 09, 2010, 07:20:34 AM
yea I don't really see why he says things like mirc scripting will be discontinued shortly without providing any proof/evidence.
*long sigh*
Quote from: Falcon on January 15, 2010, 10:53:05 AM
Well up to now vcmp has only had irc scripting released so all server's currently run std server with irc scripts. So trying to give them time to convert there modes in pawn.

Quote from: Ettans on February 09, 2010, 08:06:29 AM
some people are used to PAWN
Any that I know?

Quote from: Ettans on February 09, 2010, 08:06:29 AM
and some to Squirrel
Basically they're the ones behind starting/continuing this topic. I see no valid reason for them not to use Pawn or a hacked server till (and if) SQ is officially supported.

Quote from: Ettans on February 09, 2010, 08:06:29 AM
Squirrel would be better for VC:MP.
Not much.
Title: Re: Squirrel
Post by: SilenusShar on February 09, 2010, 10:01:00 AM
Quote from: Windlord on February 09, 2010, 02:05:40 AM
SilenusShar:
QuoteIf you want evidence visit the unofficial forums and take a look at a Squirrel script. Then go to a samp forum and take a look at a pawn script.

The main reason no one bothers uploading benchmarks is because it's pointless.
Most of us can see that Squirrel is a faster and easier language for vcmp :)

Im not going to spend time digging about to prove your point for you.

i would laugh you out of the door if you proposed it to me in the manor you just have.

Your trying to convince the developers to implement it, not me. if they want to implement it "just on your word that its better" that would be up to them (rather foolish).


Edit:
This is an appalling attempt to ask for something to become implemented.

anyway.... good luck, i think your gonna need it.

Title: Re: Squirrel
Post by: maxorator on February 09, 2010, 01:33:56 PM
We haven't said we'll never add Squirrel. Some people prefer Pawn, some prefer Squirrel. The fact is, Pawn came first. It was decided long ago to add it to VC:MP. And we won't remove it. We can't start working on adding another scripting language when we're not done with this one yet.
Title: Re: Squirrel
Post by: Windlord on February 09, 2010, 02:29:12 PM
@maxorator;
Thank you for your input. It is always nice to have input from a developer.
If you don't mind, I'd like to see how far this thread goes. :)

@SilenusShar;
I am not trying to ask for a squirrel implementation. I am aware that it is not possible at this stage.
Forze was and he did a good job but it seems like his explanations were not clear enough for you people.

@Ettans;
You certainly have understood the point of my post. Thank you. Nice wiki btw ;)

@ULK.akiharu;
You seem to be speaking for the majority :D
It seems like sir Boss has a false sense of superiority in many aspects ;)

now... :drumrolls:

@Boss;
We would all be glad if you did not fill up our screens with your annoying line-to-line approach :)
While it may be convenient for you not to create a logical structure for your own arguments, the excessive spam is not very friendly to us.
Your last reply did not involve much actual feedback to my post but instead went nitpicking around.

Just for your information;

Lua and Squirrel are both dynamic in nature and are capable of many more things compared to Pawn. This statement does not even need to be proven.
However, disregarding all of the above, all three languages are based on C or a subset of C and are lightweight making them more or less similar in their speed. (If you say 20ms is small)

Now, if you have carefully read my post above, you would have noticed that I have not said anything about the speed of the language itself.
I have merely commented on how fast using Squirrel in vcmp would be compared to using Pawn.

This is down to the way you can write scripts in its respective languages.
I myself do not know much about squirrel but I am aware how easier it is to write scripts in squirrel and how less steps are needed for the same output. (compared to pawn)

In the end, less crunching and more scripting lets you create better scripts and allows you to enjoy the process better as well. It also allows your script to be quicker at doing things as it does not have hurdles to jump pass every time.

PS. Here's a link (http://www.buckingham.ac.uk/english/guide/its.html) for you.
Be careful when you're up against one of the grammar nazis of VC:MP  :)
Title: Re: Squirrel
Post by: Knucis on February 09, 2010, 02:38:24 PM
Quote from: Windlord on February 09, 2010, 02:29:12 PM
..
PS. Here's a link (http://www.buckingham.ac.uk/english/guide/its.html) for you.
Be careful when you're up against one of the grammar nazis of VC:MP  :)
Hahaha, just laughing so hard rofl.

But yeah, as the topic says. SQ would be pretty good for VC:MP, Imo, Pawn isn't that hard, but has his cons, as all the script languages has. Squirrel is easy to learn, while Pawn took me alot of time to understand those new, forwards, etc. But they are both good scriptin' languages, it doesn't mean that one of them has to go down!
Here's a small suggestion, if VC:MP devs are working on Pawn atm, then let them working on it. About Squirrel, since VRocker and Juppi started it, why dont they finish it? Adding VC:MP 0.z r2 support?

Well, This is just my oppinion, dont take it personally (although I am not offending anyone here, (I guess)). We all have our opinions, respect our opinions lol!

(*Lols*)
Title: Re: Squirrel
Post by: SilenusShar on February 09, 2010, 02:42:41 PM
Quote from: maxorator on February 09, 2010, 01:33:56 PM
We haven't said we'll never add Squirrel. Some people prefer Pawn, some prefer Squirrel. The fact is, Pawn came first. It was decided long ago to add it to VC:MP. And we won't remove it. We can't start working on adding another scripting language when we're not done with this one yet.

That is a positive response windlord, be content with it.


Edit:
stop proclaiming to be some grammatical professor, we were only asking for evidence (as would anyone you approach with a proposition of this nature)

Edit2:
My glass is half full, how’s it looking for you?
Title: Re: Squirrel
Post by: Boss on February 09, 2010, 03:18:21 PM
Quote from: Windlord on February 09, 2010, 02:29:12 PM
You seem to be speaking for the majority :D
It seems like sir Boss has a false sense of superiority in many aspects ;)
Two people do not form a majority, sorry.

Quote from: Windlord on February 09, 2010, 02:29:12 PM
We would all be glad if you did not fill up our screens with your annoying line-to-line approach :)
Quoting is used by eveyone in this thread. If you don't like it - you are more than welcome to leave.

Quote from: Windlord on February 09, 2010, 02:29:12 PM
(If you say 20ms is small)
May I please know how a scripting language affects application's text output speed? Thanks.

Quote from: Windlord on February 09, 2010, 02:29:12 PM
I have merely commented on how fast using Squirrel in vcmp would be compared to using Pawn.
Depends on the scripter entirely.

Quote from: Windlord on February 09, 2010, 02:29:12 PM
I myself do not know much about squirrel
*facepalm*

Quote from: Windlord on February 09, 2010, 02:29:12 PM
It also allows your script to be quicker at doing things as it does not have hurdles to jump pass every time.
I suppose you never scripted in Pawn either.

Quote from: Windlord on February 09, 2010, 02:29:12 PM
PS. Here's a link (http://www.buckingham.ac.uk/english/guide/its.html) for you.
What exactly was that about? If it's about my highlighted "its", then I just wanted to underline that you pretend some functions like findPlayer are native to SQ, while they are not. These functions have nothing to do with Squirrel and are coded entirely by server developers. The same function can be added in VC-MP's Pawn server too if you hate includes so much.

Quote from: Windlord on February 09, 2010, 02:29:12 PM
Be careful when you're up against one of the grammar nazis of VC:MP  :)
I'm not a native speaker, so I've got a nazi immunity here. ^^

Quote from: Knucis on February 09, 2010, 02:38:24 PM
But yeah, as the topic says. SQ would be pretty good for VC:MP, Imo, Pawn isn't that hard, but has his cons, as all the script languages has. Squirrel is easy to learn, while Pawn took me alot of time to understand those new, forwards, etc. But they are both good scriptin' languages, it doesn't mean that one of them has to go down!
As max has already stated, if it comes to implementing SQ it will be avaliable along with Pawn (like Pawn and mrc before).

Quote from: Knucis on February 09, 2010, 02:38:24 PM
About Squirrel, since VRocker and Juppi started it, why dont they finish it? Adding VC:MP 0.z r2 support?
VRocker and Juppi are working on their own MP with Squirrel support.
Title: Re: Squirrel
Post by: Sudokono on February 09, 2010, 07:38:21 PM
http://codeplea.com/game-scripting-languages ::)
Title: Re: Squirrel
Post by: Force on February 09, 2010, 08:43:32 PM
Quote from: Sudokono on February 09, 2010, 07:38:21 PM
http://codeplea.com/game-scripting-languages ::)

Hopefully this will answer some question/queries. However I do feel it is worth pointing out that the Squirrel example in there is using an older version (v2) where as the newer version (v3) which is implemented into the ("Hacked") Squirrel server is much quicker.

That's as far as I'm going to go in this topic, I can see it turned into a huge flame war, I think the main point of this topic was to ask about Squirrel being implemented not which language is better.

I won't be posting any more replies.

@Knucis: Maybe you should check the unofficial VC-MP forums. ;)