SA-MP Forums

Go Back   SA-MP Forums > SA-MP Scripting and Plugins > Filterscripts > Tools and Files

Reply
 
Thread Tools Display Modes
Old 31/03/2019, 10:35 PM   #1
Peek
Little Clucker
 
Join Date: Dec 2013
Posts: 6
Reputation: 7
Default PAWN Fiddle - Share & run PAWN code online

PAWN Fiddle
Share & run PAWN code

PAWN Fiddle is a playground platform for the PAWN scripting language. Create, execute, fork and share code snippets across the SA-MP community.

What is this for?
If you need help with your code, you can use this fiddle service instead of posting big code blocks in the forum or discord which isn't really testable. With PAWN Fiddle you can send a complete example of your problem, which makes it easier for the other person to fix your code / help you with the integrated compiler and plugin / include support. This could also be used to demonstrate the use of your plugin / include (provided it's a sampctl-compatible PAWN-package), or snippet hosting.

How do I use this?
  1. Navigate to https://fiddle.sa-mp.dev
  2. Select the dependencies your fiddle needs.
  3. Write / Paste your code.
  4. Check if your code compiles, by clicking the Run button.
  5. Share your fiddle with the world.

Liveserver (Beta)
https://fiddle.sa-mp.dev

GitHub (Source Code)
https://github.com/samp-dev/fiddle
Peek is offline   Reply With Quote
Old 01/04/2019, 12:44 AM   #2
Despare
Big Clucker
 
Join Date: Aug 2009
Posts: 110
Reputation: 0
Default Re: PAWN Fiddle - Share & run PAWN code online

Great tool! very good !
Despare is offline   Reply With Quote
Old 01/04/2019, 01:20 AM   #3
hotspicytaco
Huge Clucker
 
hotspicytaco's Avatar
 
Join Date: Dec 2011
Location: Taco Bell
Posts: 230
Reputation: 44
Default Re: PAWN Fiddle - Share & run PAWN code online

Finally! Thank you!
__________________
hotspicytaco is offline   Reply With Quote
Old 01/04/2019, 02:18 AM   #4
Freaksken
Gangsta
 
Freaksken's Avatar
 
Join Date: Mar 2009
Location: Belgium
Posts: 501
Reputation: 367
Default Re: PAWN Fiddle - Share & run PAWN code online

Really, really like the idea!
__________________
Always keep in mind that a lot of people are active on this forum in their spare time.
They are sacrificing time they could easily spend on things they would rather do, to help you instead.


[Include] FCNPC A.I. - [Tutorial] Speedometer - [WIP] Single-player-like co-op mission - [Other] List of all my work
Freaksken is offline   Reply With Quote
Old 01/04/2019, 07:37 PM   #5
RenanMsV
Big Clucker
 
Join Date: May 2016
Posts: 190
Reputation: 6
Default Re: PAWN Fiddle - Share & run PAWN code online

pawn Code:
#include <a_samp>

main(){}
Code:
[ FATAL ] Line 1: cannot read from file: "a_samp"
__________________


Free SAMP Server Hosting (20 slots) or Hosted Tab: http://ultra-h.com
RenanMsV is offline   Reply With Quote
Old 01/04/2019, 08:58 PM   #6
Crayder
Banned
 
Join Date: Sep 2013
Location: Flames of Hell
Posts: 3,331
Reputation: 652
Default Re: PAWN Fiddle - Share & run PAWN code online

Considering it literally uses a SA-MP server instead of a separate PAWN implementation, this isn't a "PAWN Fiddler." It's a SA-MP Gamemode Fiddler.

Also, can't include a_samp.
Crayder is offline   Reply With Quote
Old 01/04/2019, 09:05 PM   #7
DAKYSKYE
Banned
 
Join Date: Jul 2018
Location: Rustavi, Georgia.
Posts: 34
Reputation: 0
Default Re: PAWN Fiddle - Share & run PAWN code online

Quote:
Originally Posted by RenanMsV View Post
pawn Code:
#include <a_samp>

main(){}
Code:
[ FATAL ] Line 1: cannot read from file: "a_samp"
first of all you need to get sampctl/samp-stdlib library.
DAKYSKYE is offline   Reply With Quote
Old 01/04/2019, 09:13 PM   #8
RenanMsV
Big Clucker
 
Join Date: May 2016
Posts: 190
Reputation: 6
Default Re: PAWN Fiddle - Share & run PAWN code online

Quote:
Originally Posted by DAKYSKYE View Post
first of all you need to get sampctl/samp-stdlib library.
This works
__________________


Free SAMP Server Hosting (20 slots) or Hosted Tab: http://ultra-h.com
RenanMsV is offline   Reply With Quote
Old 01/04/2019, 11:37 PM   #9
Peek
Little Clucker
 
Join Date: Dec 2013
Posts: 6
Reputation: 7
Default Re: PAWN Fiddle - Share & run PAWN code online

Quote:
Originally Posted by ****** View Post
1) The domain implies a far more official status than this really has. You should add a note that this is in no way endorsed or associated with SA:MP.
That was not my intention. I added a non-affiliation disclaimer on the mainpage (sa-mp.dev).

Quote:
Originally Posted by ****** View Post
2) The list of dependencies seems to shuffle constantly, and is almost unusable for browsing in its current state. It should at least be alphabetical.
Fixed in cdb8512

Quote:
Originally Posted by ****** View Post
3) The "Run"/"Stop" button doesn't detect when the server shuts down normally, thus ending the script.
The "Stop" button is displayed until the max. execution time is reached or the sampctl process dies.

Quote:
Originally Posted by ****** View Post
4) You can't type any commands in to the server once running.
Do you mean RCON commands? Would this be useful?

Quote:
Originally Posted by ****** View Post
5) Tab indentation doesn't use tabs.
I guess indentation using space became more popular. This is a default setting of the Monaco-Editor.

Quote:
Originally Posted by ****** View Post
6) The auto-complete is nice, but doesn't parse the added includes, so doens't really help much.
This is also a standard feature of the Monaco-Editor. I'll see if I can possibly add autocompletion for natives.

Quote:
Originally Posted by ****** View Post
7) The icons on the nested dependencies look like they can be downloaded.
Fixed in ed689fd

Quote:
Originally Posted by ****** View Post
It is very offputting from using the tool at all when the footer has an emoji in it.

Edit: It was extremely ironic that the forums replaced `` with an emoji...
In my opinion an emoji shouldn't be "offputting" from using a tool, especially in a gaming community.

Quote:
Originally Posted by ****** View Post
9) Refreshing the page momentarily flashes an error about the backend connection being lost.
Fixed in f16e50e

Quote:
Originally Posted by ****** View Post
10) samp-stdlib isn't implicitly imported, despite `<a_samp>` being automatically included.
Added in e80bb03

Quote:
Originally Posted by ****** View Post
11) The default code should probably also include `main()`, since that's required by the server.
Added in 43ff82b

Quote:
Originally Posted by ****** View Post
Can you clarify exactly what "fork" is doing? That's a GitHub term, which copies the whole of a repository (or in this case post) to your account once. The closest analogy in pure Git would be either cloning or branching, but neither has a one time limit, and I didn't log in to GitHub, so I'm not sure where it is being forked to.

Also, the behaviour without a "fork" is a little annoying, since you can't edit anything. Every other fiddle service allows you to instantly start editing existing code. It doesn't save to the original link, but creates a new one when clicking save. In fact, that would do away with the need for the confusing terminology entirely.
The fork button creates a new identical fiddle, that's all it does.

I really appreciate your extensive feedback. If you have further feature requests or improvements, please open an issue on GitHub.
Peek is offline   Reply With Quote
Old 02/04/2019, 04:17 AM   #10
Crayder
Banned
 
Join Date: Sep 2013
Location: Flames of Hell
Posts: 3,331
Reputation: 652
Default Re: PAWN Fiddle - Share & run PAWN code online

In recap of my previous comment, I have nothing against this being a Gamemode Fiddler. I just think that name is better in this case. In fact I prefer the idea of having the option to run a SA-MP Gamemode online.

Perhaps you could make some fiddler plugin that allows access to scriptfiles within the site, downloading and viewing them as well. For example what if my fiddler code used y_bitmap to produce a .bmp file that I would like to see, that option would be amazing.
Crayder is offline   Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
[Tool/Web/Other] PAWN Playground - Online code runner Slice Tools and Files 128 07/12/2017 11:00 PM
[Pedido] Pawn online zCyan Português/Portuguese 9 31/07/2017 01:21 PM
online pawn box IndependentGaming Everything and Nothing 11 10/03/2015 09:25 PM
New to pawn, trying to convert some C code to pawn CHC Scripting Help 2 22/06/2012 06:09 AM
Online Pawn Editer? seanny Everything and Nothing 4 31/07/2011 09:28 PM


All times are GMT. The time now is 02:08 AM.


Powered by vBulletin® Version 3.8.6
Copyright ©2000 - 2019, Jelsoft Enterprises Ltd.