SA-MP Forums

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

Reply
 
Thread Tools Display Modes
Old 14/10/2018, 01:37 AM   #1
FixFl0w
Big Clucker
 
Join Date: Aug 2016
Posts: 94
Reputation: 4
Default [MySQL - R41]: Dynamic teleports system - FixFl0w

Hello, this system has the following commands.

/createteleport [name] - create a teleport.
/teleport [name] - you teleport to a teleport.
/teleports - list of all available teleports.
/deleteteleport (Admin rcon) - You delete a teleport.

Then I will leave some images of this.




Pastebin: https://pastebin.com/KChBjwBF

FixFl0w.

Sorry my language is Spanish, but that section was deleted, sad

Solved
__________________
n.n

Last edited by FixFl0w; 14/10/2018 at 02:18 PM.
FixFl0w is offline   Reply With Quote
Old 14/10/2018, 02:52 AM   #2
willbedie
Gangsta
 
willbedie's Avatar
 
Join Date: Feb 2016
Location: Albania
Posts: 546
Reputation: 45
Default Re: [MySQL - R41]: Dynamic teleports system - FixFl0w

Ok, I've noticed a lot of mistakes on the script, but I will keep it short.

- The identation is killed, that really hurts my eyes.
- Spanish language? Why not translate it to english and then release it?
- new telexd[12]; 12? What if the teleport name is "iwanttogothereplease" higher than 12 characters? Increase that.

This:
PHP Code:
new Float:XXD,Float:YXD,Float:ZXD
Could be done like this:
PHP Code:
new FloatPosition[3]; 
Then:
PHP Code:
GetPlayerPos(playerid,XXD,YXD,ZXD); 
To:
PHP Code:
GetPlayerPos(playerid,Position[0], Position[1], Position[2]); 
This:
PHP Code:
('%s','%f','%f','%f','%d','%s')",nombretele,XXD,YXD,ZXD,interiorXD,Nombre(playerid)); 
To:
PHP Code:
('%s','%f','%d','%s')",nombretele,Position[3],interiorXD,Nombre(playerid)); 
Also why are you using %s and not %e to escape strings instead? It's an updated version of MySQL!

It's pretty shitty sorry to say, but please improve your code.


And, one more thing!

Do you even compile your code before releasing?!

PHP Code:
#include <a_samp>
#include <a_mysql>
#include <zcmd> 
PHP Code:
if(sscanf(params,"s[12]",telexd)) return SendClientMessage(playerid,-1,"*Use: /teleport [name]"); 
You use sscanf on a command, but it's not compiled on the script? Is this copy-pasted from someone else?


PHP Code:
error 010invalid function or declaration
error 017
undefined symbol "Database"
error 017undefined symbol "sscanf"
error 017undefined symbol "Nombre"
error 017undefined symbol "SIN_USO"
warning 204symbol is assigned a value that is never used"R"
error 017undefined symbol "sscanf"
error 017undefined symbol "sscanf"
error 017undefined symbol "DIALOGO_TELESXD"
error 017undefined symbol "DIALOGO_TELESXD"
error 017undefined symbol "DIALOGO_TELESXD"
Pawn compiler 3.2.3664              Copyright (c1997-2006ITB CompuPhase


10 Errors

Lol! You don't even know what you're doing bud!
__________________


willbedie is online now   Reply With Quote
Old 14/10/2018, 03:12 AM   #3
FixFl0w
Big Clucker
 
Join Date: Aug 2016
Posts: 94
Reputation: 4
Default Re: [MySQL - R41]: Dynamic teleports system - FixFl0w

Rays, I was wrong, in the transfer of the gamemode to pastebin. thanks, I'll solve it
__________________
n.n
FixFl0w is offline   Reply With Quote
Old 14/10/2018, 03:20 AM   #4
willbedie
Gangsta
 
willbedie's Avatar
 
Join Date: Feb 2016
Location: Albania
Posts: 546
Reputation: 45
Default Re: [MySQL - R41]: Dynamic teleports system - FixFl0w

What do you mean? Did you just copy-paste it from a gamemode to pastebin?
__________________


willbedie is online now   Reply With Quote
Old 14/10/2018, 03:29 AM   #5
FixFl0w
Big Clucker
 
Join Date: Aug 2016
Posts: 94
Reputation: 4
Default Re: [MySQL - R41]: Dynamic teleports system - FixFl0w

The system of course I did it, but it was a serious mistake of mine not to compile it, I had it already days ago, thanks for the help, the pastebin, will be updated.
__________________
n.n
FixFl0w is offline   Reply With Quote
Old 14/10/2018, 03:51 AM   #6
willbedie
Gangsta
 
willbedie's Avatar
 
Join Date: Feb 2016
Location: Albania
Posts: 546
Reputation: 45
Default Re: [MySQL - R41]: Dynamic teleports system - FixFl0w

Yeah and that's not the only mistake, read out carefully what I wrote, don't just ignore everything.
__________________


willbedie is online now   Reply With Quote
Old 14/10/2018, 04:10 AM   #7
FixFl0w
Big Clucker
 
Join Date: Aug 2016
Posts: 94
Reputation: 4
Default Re: [MySQL - R41]: Dynamic teleports system - FixFl0w

I did it, and I took your recommendations into account, thank you very much.
__________________
n.n
FixFl0w is offline   Reply With Quote
Old 19/10/2018, 01:54 AM   #8
Marshmello
Big Clucker
 
Marshmello's Avatar
 
Join Date: Oct 2016
Location: LocalHost
Posts: 70
Reputation: 0
Default Re: [MySQL - R41]: Dynamic teleports system - FixFl0w

k verguensa you give me fix and you call scripter ?, please still do not know how to optimize a simple code? ... Take Those tips that are giving you! .. and learn that your vastete criticized me but now look at how things change. .. PS: I'm an old friend
__________________
Marshmello is offline   Reply With Quote
Old 20/10/2018, 08:06 AM   #9
FixFl0w
Big Clucker
 
Join Date: Aug 2016
Posts: 94
Reputation: 4
Default Re: [MySQL - R41]: Dynamic teleports system - FixFl0w

Quote:
Originally Posted by Marshmello View Post
k verguensa you give me fix and you call scripter ?, please still do not know how to optimize a simple code? ... Take Those tips that are giving you! .. and learn that your vastete criticized me but now look at how things change. .. PS: I'm an old friend
First of all, I will not discuss with a gm's editor, and second, the
problems have been solved, of course I took into account the comments of willbedie, or I would not have noticed such serious errors ..

PD: I left this for quite some time, I forgot several things, that's why I made mistakes and I never considered you my friend. goodbye
__________________
n.n
FixFl0w is offline   Reply With Quote
Old 20/10/2018, 09:34 PM   #10
Chaprnks
Gangsta
 
Chaprnks's Avatar
 
Join Date: Sep 2007
Location: Soviet America
Posts: 748
Reputation: 64
Default Re: [MySQL - R41]: Dynamic teleports system - FixFl0w

Quote:
Originally Posted by willbedie View Post
- The identation is killed, that really hurts my eyes.
Exactly my first impression also. I was like "ooh! dynamic teleport system.. GUD! mysql.. GUD! dialog based.. GUD! ..... uh oh, nevermind"
__________________
Chaprnks 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
[FilterScript] Group System (2). [MySQL\Dynamic Rank and permission system] verlaj Filterscripts 11 26/08/2017 08:53 PM
Creating a command that lists all dynamic'ly created teleports? JaKe Elite Scripting Help 11 09/02/2016 01:24 PM
[Tutorial] Dynamic Faction System [MySQL] Abreezy Tutorials 12 06/08/2013 02:20 PM
[Help] Mysql Dynamic System. tony_fitto Scripting Help 4 07/07/2012 04:10 AM
[FilterScript] Dynamic Teleports 0.1 - by Kfir KfirRP Filterscripts 4 31/07/2011 07:44 PM


All times are GMT. The time now is 09:51 PM.


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