Vice City Multiplayer

VC:MP 0.3 => mIRC/pawn Scripting => ShowRoom (pawn) => Topic started by: NE.Restricted on October 13, 2013, 07:14:36 pm

Title: [INC] My plugin - A whole new way of scripting
Post by: NE.Restricted on October 13, 2013, 07:14:36 pm
Hey guys I have a new plugin I want to share!
Functions:
int - public
arg - (
start - ){
end - }
new_variable - new
add - +
subtract - -
multiply - *
divide - /
MessageSendPlayer - SendClientMessage
MessageSendAll - SendClientMessageToAll
SkinNew - AddPlayerClass
SkinNewEx - AddPlayerClassEx
VehicleNew - AddStaticVehicle
PickupNew - AddStaticPickup
An example using these:
Code: [Select]
int OnPlayerText args playerid, text start
if(strcmd(text, "hello", true) == 0)
{
MessageSendPlayer(playerid, (color), "Hello!");
Test();
}
int Test arg start
MessageSendAll("Droopy proopy, hello fellow");
end
int PrintNumbers arg amount start
new_variable count;
while(count < amount)
{
printf("%d", count);
count add 1;
end
SkinNew, VehicleNew and PickupNew don't have examples :(

Instructions:
Download the file and save it to /pawno/include.
On your pwn files, add this line at top: #include <nerestricted_plugin>

Download:
Click here (http://www.solidfiles.com/d/e45a838bd8/)
Title: Re: [INC] My plugin - A whole new way of scripting
Post by: stormeus on October 13, 2013, 08:17:20 pm
Moved, fixed broken download link, added [INC] tag.



Personally I think this makes things much more confusing for Pawn scripters than they already are.
Title: Re: [INC] My plugin - A whole new way of scripting
Post by: NE.Restricted on October 13, 2013, 09:38:21 pm
Moved, fixed broken download link, added [INC] tag.



Personally I think this makes things much more confusing for Pawn scripters than they already are.
Thats for new pawn scripters, who don't like the current scripting in pawn. This language is similar to .NET and C++ except some more functions.
Title: Re: [INC] My plugin - A whole new way of scripting
Post by: stormeus on October 20, 2013, 08:59:47 pm
They're not really new functions though, and this is nowhere close to C++. The language isn't even consistent; in some places you have "start" and "end":
Code: [Select]
int Test arg start
MessageSendAll("Droopy proopy, hello fellow");
end

But then in others you're still using braces:
Code: [Select]
int OnPlayerText args playerid, text start
if(strcmd(text, "hello", true) == 0)
{
MessageSendPlayer(playerid, (color), "Hello!");
Test();
}

Plus, the example code is broken and would fail to compile with your INC, and so people will get the idea that it still works. For example:
Code: [Select]
count add 1;

The macro you assign to add is just +, which means this entire line of code is only count + 1. It won't actually increase the counter, so you'd have to do count = count add 1. Which is still convoluted because I can't name a single programming language off the top of my head (and trust me, there are a lot... including Visual Basic) that use "add" as an operator.

In my mind this is the kind of INC that looks cool on paper, but to actually use it would be more confusing than simply learning Pawn.
Title: Re: [INC] My plugin - A whole new way of scripting
Post by: NE.Restricted on December 13, 2013, 08:37:30 am
They're not really new functions though, and this is nowhere close to C++. The language isn't even consistent; in some places you have "start" and "end":
Code: [Select]
int Test arg start
MessageSendAll("Droopy proopy, hello fellow");
end

But then in others you're still using braces:
Code: [Select]
int OnPlayerText args playerid, text start
if(strcmd(text, "hello", true) == 0)
{
MessageSendPlayer(playerid, (color), "Hello!");
Test();
}

Plus, the example code is broken and would fail to compile with your INC, and so people will get the idea that it still works. For example:
Code: [Select]
count add 1;

The macro you assign to add is just +, which means this entire line of code is only count + 1. It won't actually increase the counter, so you'd have to do count = count add 1. Which is still convoluted because I can't name a single programming language off the top of my head (and trust me, there are a lot... including Visual Basic) that use "add" as an operator.

In my mind this is the kind of INC that looks cool on paper, but to actually use it would be more confusing than simply learning Pawn.
1. I meant like 1% c++ because pawn already is.
2. It isnt consistent because start is }( and not (.