SA-MP Forums Archive
[Tool/Web/Other] PAWN Fiddle - Share & run PAWN code online - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Filterscripts (https://sampforum.blast.hk/forumdisplay.php?fid=17)
+---- Forum: Tools and Files (https://sampforum.blast.hk/forumdisplay.php?fid=82)
+---- Thread: [Tool/Web/Other] PAWN Fiddle - Share & run PAWN code online (/showthread.php?tid=665358)



PAWN Fiddle - Share & run PAWN code online - Peek - 31.03.2019

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


Re: PAWN Fiddle - Share & run PAWN code online - Despare - 31.03.2019

Great tool! very good !


Re: PAWN Fiddle - Share & run PAWN code online - hotspicytaco - 01.04.2019

Finally! Thank you!


Re: PAWN Fiddle - Share & run PAWN code online - Freaksken - 01.04.2019

Really, really like the idea!


Re: PAWN Fiddle - Share & run PAWN code online - RenanMsV - 01.04.2019

pawn Code:
#include <a_samp>

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



Re: PAWN Fiddle - Share & run PAWN code online - Crayder - 01.04.2019

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.


Re: PAWN Fiddle - Share & run PAWN code online - DAKYSKYE - 01.04.2019

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.


Re: PAWN Fiddle - Share & run PAWN code online - RenanMsV - 01.04.2019

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


Re: PAWN Fiddle - Share & run PAWN code online - Peek - 01.04.2019

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.


Re: PAWN Fiddle - Share & run PAWN code online - Crayder - 02.04.2019

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.


Re: PAWN Fiddle - Share & run PAWN code online - Romz - 02.04.2019

Add information about variations in the code, it will be convenient for development.


Also wondering what version of the compiler?


Re: PAWN Fiddle - Share & run PAWN code online - Chaprnks - 06.04.2019

Very interesting! It reminds me of PAWN playground, but with sampctl support added! Hopefully it\'ll be used often


Re: PAWN Fiddle - Share & run PAWN code online - Yukie - 06.04.2019

wow! very nice


Re: PAWN Fiddle - Share & run PAWN code online - Romz - 10.04.2019

Please disable the check from bots. I can not use your site. After each press of the run button, a check is issued.