29.09.2011, 14:04
(
Last edited by Sasino97; 27/06/2018 at 03:41 PM.
Reason: RELEASED VERSION 1.0 RC
)
Discontinued.
Introduction
Hi Readers
I'm currently working on a C project, that will work with PAWN scripts (4.0 compiler):
It work similar to Java(The .jar file runs in Java Abstract Machine), because this program is using the PAWN Abstract Machine, like SA-MP, and I'm implementing a lot of functions from the start.
I decided to make this program for PAWN scripters that don't know any other language.
I'm using some of the default libraries files made by CompuPhase, but I edited the names of the functions (Now they're more stylish XD):
String.inc - This library provides functions for string handling
Core.inc - This one has the basic core functions
Float.inc - This one has functions for managing floating point values
Fixed.inc - This one is not included in SA-MP, It's util for fixed point values
And finally my own include file!! It has the basic functions for managing an entire program.
Windows.inc - Made entirely by me, Sasino97
And now a little example to show you just 1/5 of what you can do now with this. (The example has changed a bit before the last example)
Example
(New syntax)
Windows PAWN 1.0 RC - Release
Notice: The examples are compiled in amx format, but with the extension ".pwnexe".
A lot of people requested it, so I will release it now (With the source code
http://www.2shared.com/file/6KUj2-BT/WinPawn.html
Set-up
This doens't have an auto-extract installer, so you have to set it up manually:
1 - Create a folder called "WinPawn" into your "Program Files" or "Program Files (x86)" directory.
2 - Put "WinPawn.exe" and the "compiler" folder into WinPawn
3 - Open your PAWN Code Editor (I suggest to use Notepad++ instead of pawno, because you can link multiple compilers), and give the right directory to the compiler, or if using pawno, put pawno in the directory of WinPawn.
4 - Include "ppp" and "windows", make your program, compile. If you are using Notepad++, please compile to ".pwnexe".
5 - Right click on the .amx/.pwnexe file, select "Open with" and browse for my program in the WinPawn directory.
6 - In the description box, write "Executable PAWN File".
7 - Press OK, and see how it works
8 - If something went wrong read again all.
9 - Good work with your programs
PAWN++
Pawn++ is not a big thing, it's just a file with some defines that you will find useful:
I called it with that name because introduces a new way to add variables: The keyword "new" disappears, and
to declare a variable, it will use
Introduction
Hi Readers
I'm currently working on a C project, that will work with PAWN scripts (4.0 compiler):
It work similar to Java(The .jar file runs in Java Abstract Machine), because this program is using the PAWN Abstract Machine, like SA-MP, and I'm implementing a lot of functions from the start.
I decided to make this program for PAWN scripters that don't know any other language.
I'm using some of the default libraries files made by CompuPhase, but I edited the names of the functions (Now they're more stylish XD):
String.inc - This library provides functions for string handling
Core.inc - This one has the basic core functions
Float.inc - This one has functions for managing floating point values
Fixed.inc - This one is not included in SA-MP, It's util for fixed point values
And finally my own include file!! It has the basic functions for managing an entire program.
Windows.inc - Made entirely by me, Sasino97
And now a little example to show you just 1/5 of what you can do now with this. (The example has changed a bit before the last example)
Example
(New syntax)
pawn Code:
/**
InputTest - By [GF]Sasino97.
This example will get keyboard and mouse input from the user and send it back as a messagebox.
This file is provided as is (no warranties).
*/
#include <ppp> // PAWN++ - Read below
#include <windows> // Windows
#include <string> // It's the same of SA-MP, but the names are edited :D
// Notice that the "Int:", "Point:", "Color:" and "Char:" Tags ARE OPTIONAL.
Int: @WinMain() /* The int tag is optional, same as "@WinMain()" */
{
SetWindowText("This is an input test!");
MaximizeWindow();
return 0;
}
Int: @WinExit() { Quit(); }
Int: @OnClick(Int: button, Point: x, Point: y) // "button" is the mouse button (Left, right, middle), not a button control, see windows.inc
{
CHAR s{256}; // Same of "new s{256};", it will give no errors
String.Format(s, 256, true, "Button: %d\nX: %d\nY: %d", button, x, y); // Same of "format" (But only in SA-MP, here it'll give errors unless you define it)
MessageBox(s, "OnClick", ICON_WARNING, DIALOG_OK);
return 0;
}
Int: @OnKeyPress(Int: key) // When a key is pressed
{
CHAR s{256};
String.Format(s, 256, true, "Key: %d", key);
MessageBox(s, "OnKeyPress", ICON_WARNING, DIALOG_OK);
return 0;
}
Notice: The examples are compiled in amx format, but with the extension ".pwnexe".
A lot of people requested it, so I will release it now (With the source code
http://www.2shared.com/file/6KUj2-BT/WinPawn.html
Set-up
This doens't have an auto-extract installer, so you have to set it up manually:
1 - Create a folder called "WinPawn" into your "Program Files" or "Program Files (x86)" directory.
2 - Put "WinPawn.exe" and the "compiler" folder into WinPawn
3 - Open your PAWN Code Editor (I suggest to use Notepad++ instead of pawno, because you can link multiple compilers), and give the right directory to the compiler, or if using pawno, put pawno in the directory of WinPawn.
4 - Include "ppp" and "windows", make your program, compile. If you are using Notepad++, please compile to ".pwnexe".
5 - Right click on the .amx/.pwnexe file, select "Open with" and browse for my program in the WinPawn directory.
6 - In the description box, write "Executable PAWN File".
7 - Press OK, and see how it works
8 - If something went wrong read again all.
9 - Good work with your programs
PAWN++
Pawn++ is not a big thing, it's just a file with some defines that you will find useful:
I called it with that name because introduces a new way to add variables: The keyword "new" disappears, and
to declare a variable, it will use
pawn Code:
#define CELL new
#define CHAR new Char:
#define BOOL new bool:
#define INT new Int:
#define POINT new Point:
#define COLOR new Color:
#define MENU new Menu:
#define EDIT new Edit:
#define RADIO new Radio:
#define FLOAT new Float:
#define FIXED new Fixed: