SA-MP Forums

Go Back   SA-MP Forums > SA-MP Scripting and Plugins > Plugin Development

Reply
 
Thread Tools Display Modes
Old 05/09/2015, 09:06 PM   #91
prineside
Huge Clucker
 
Join Date: Jan 2013
Posts: 225
Reputation: 116
Default Re: samp.js - JavaScript for SA-MP

Going to play with this interesting plugin. For two years of my development in PAWN I was dreaming about such a language with dynamic array sizes, closures, flexible & handy objects, normal event/callback system and no freaking PAWN compiler

Well, I just wanted to say "thanks, I love this plugin's idea and I'm going to play with it or even use it". +Rep for you, keep going!
__________________


Prineside DevTools





therainycat (prineside.com)
prineside is offline   Reply With Quote
Old 06/09/2015, 08:59 AM   #92
DRIFT_HUNTER
High-roller
 
Join Date: Oct 2009
Posts: 2,151
Reputation: 215
Default Re: samp.js - JavaScript for SA-MP

Quote:
Originally Posted by prineside View Post
Going to play with this interesting plugin. For two years of my development in PAWN I was dreaming about such a language with dynamic array sizes, closures, flexible & handy objects, normal event/callback system and no freaking PAWN compiler

Well, I just wanted to say "thanks, I love this plugin's idea and I'm going to play with it or even use it". +Rep for you, keep going!
I actually like PAWN compiler as i dont have to start my server and only than realize i fucked up somewhere
DRIFT_HUNTER is offline   Reply With Quote
Old 06/09/2015, 09:37 PM   #93
Chaser98
Little Clucker
 
Join Date: Nov 2010
Posts: 44
Reputation: 26
Default Re: samp.js - JavaScript for SA-MP

Any way to use MongoDB with this?
Chaser98 is offline   Reply With Quote
Old 06/09/2015, 09:42 PM   #94
ChromeAmazing
Huge Clucker
 
ChromeAmazing's Avatar
 
Join Date: Jun 2014
Location: Texas
Posts: 262
Reputation: 56
Default Re: samp.js - JavaScript for SA-MP

Nice! Never seen a plugin like it!
+rep
__________________
avrintech.net - Professional and Affordable Web Hosting starting only at $1.50 /month!
ChromeAmazing is offline   Reply With Quote
Old 07/09/2015, 01:19 AM   #95
!damo!spiderman
Huge Clucker
 
!damo!spiderman's Avatar
 
Join Date: Oct 2006
Posts: 244
Reputation: 160
Default Re: samp.js - JavaScript for SA-MP

Quote:
Originally Posted by Chaser98 View Post
Any way to use MongoDB with this?
Not currently. I do have plans to implement something like Mongo in the future though
__________________
!damo!spiderman is offline   Reply With Quote
Old 12/09/2015, 06:12 PM   #96
SkittlesAreFalling
Big Clucker
 
Join Date: Oct 2013
Posts: 155
Reputation: 14
Default Re: samp.js - JavaScript for SA-MP

Small Bug:
When typing 'loadjs <scriptname>.js' into console even though script is already loaded will crash server.

Spelling:
$fs.exits = $fs.exists @ line: 103 (samp.js/FileSystem.js)

Spelling:
[ERROR][samp.js] FileSystem.js:151: TypeError: Cannot read property 'mkdir' of undefined
[ERROR][samp.js] return this.internval.mkdir(directory);

CRASH:
Code:
SendClientMessage(player.id, COLOR.WHITE, String.format("Welcome to %s, %s!", ServerData.name, player.name);
It is because I forgot the )
Code:
SendClientMessage(player.id, COLOR.WHITE, String.format("Welcome to %s, %s!", ServerData.name, player.name));
Quote:
[ERROR][samp.js] js/cops&robbers.js:317: SyntaxError: missing ) after argument list
[debug] Server crashed due to an unknown error
[debug] Native backtrace:
[debug] #0 0049dc0c in ?? () from samp-server.exe
[debug] #1 779bd2d9 in ?? () from C:\WINDOWS\SYSTEM32\ntdll.dll
[debug] #2 779e8e5c in ?? () from C:\WINDOWS\SYSTEM32\ntdll.dll
[debug] #3 698a3264 in ?? () from C:\WINDOWS\system32\apphelp.dll
[debug] #4 698a328c in ?? () from C:\WINDOWS\system32\apphelp.dll
[debug] #5 0049eef9 in ?? () from samp-server.exe
[debug] #6 0048b460 in ?? () from samp-server.exe
[debug] #7 004a5a3b in ?? () from samp-server.exe
[debug] #8 0049cf72 in ?? () from samp-server.exe

Last edited by SkittlesAreFalling; 16/09/2015 at 04:34 AM.
SkittlesAreFalling is offline   Reply With Quote
Old 17/09/2015, 05:12 PM   #97
j0n
Little Clucker
 
Join Date: Nov 2007
Posts: 13
Reputation: 0
Default Re: samp.js - JavaScript for SA-MP

Amazing work !

It's possible to use external libaries in our server delopment like socket.io ?
j0n is offline   Reply With Quote
Old 17/09/2015, 05:37 PM   #98
DRIFT_HUNTER
High-roller
 
Join Date: Oct 2009
Posts: 2,151
Reputation: 215
Default Re: samp.js - JavaScript for SA-MP

No
http://forum.sa-mp.com/showpost.php?...5&postcount=85
DRIFT_HUNTER is offline   Reply With Quote
Old 17/09/2015, 06:49 PM   #99
HardWar
Huge Clucker
 
Join Date: Oct 2012
Posts: 388
Reputation: 44
Default Re: samp.js - JavaScript for SA-MP

You forgot the dialogid argument in showDialog function, look.



it should be:
PHP Code:
return ShowPlayerDialog(this.iddialogidstylecaptioninfobutton1button2); 
and how to escape the string for use in SQLite functions? in pawn I use format and %q
HardWar is offline   Reply With Quote
Old 17/09/2015, 10:54 PM   #100
Kamper
Guest
 
Posts: n/a
Default Re: samp.js - JavaScript for SA-MP

Is it possible create a global variable to be accessible from another JS files? A kind of global variable accessible from any file

#edit
I figured out that I can simply use include function to load some JS file with a global variable xD

#another question
Can I assign a value to a new attribute of player's object, eg player.test = 1, that when the player disconnect this object will be cleared?

I noticed that when you use the function GameModeExit to reload the server, the changes made in source don't have any effect in the server until you close/open it again. It's quite bother...

Last edited by Kamper; 18/09/2015 at 03:01 AM.
  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
javascript. Banditukas Everything and Nothing 18 04/04/2015 05:00 PM
[Pedido] botão: script/ HTML/ JAVASCRIPT | SAMP FOLDER/FILE MestreSmart Português/Portuguese 6 28/02/2015 05:16 PM
Use PHP in javascript Banditukas Everything and Nothing 5 08/11/2014 05:44 AM
javascript samp:// [Ger]Little_Grandpa Help Archive 6 21/08/2010 06:24 PM


All times are GMT. The time now is 02:52 PM.


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