[MySQL - R41]: Dynamic teleports system - FixFl0w -
FixFl0w - 14.10.2018
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
Re: [MySQL - R41]: Dynamic teleports system - FixFl0w -
solstice_ - 14.10.2018
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 Float: Position[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 010: invalid function or declaration
error 017: undefined symbol "Database"
error 017: undefined symbol "sscanf"
error 017: undefined symbol "Nombre"
error 017: undefined symbol "SIN_USO"
warning 204: symbol is assigned a value that is never used: "R"
error 017: undefined symbol "sscanf"
error 017: undefined symbol "sscanf"
error 017: undefined symbol "DIALOGO_TELESXD"
error 017: undefined symbol "DIALOGO_TELESXD"
error 017: undefined symbol "DIALOGO_TELESXD"
Pawn compiler 3.2.3664 Copyright (c) 1997-2006, ITB CompuPhase
10 Errors.
Lol! You don't even know what you're doing bud!
Re: [MySQL - R41]: Dynamic teleports system - FixFl0w -
FixFl0w - 14.10.2018
Rays, I was wrong, in the transfer of the gamemode to pastebin. thanks, I'll solve it
Re: [MySQL - R41]: Dynamic teleports system - FixFl0w -
solstice_ - 14.10.2018
What do you mean? Did you just copy-paste it from a gamemode to pastebin?
Re: [MySQL - R41]: Dynamic teleports system - FixFl0w -
FixFl0w - 14.10.2018
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.
Re: [MySQL - R41]: Dynamic teleports system - FixFl0w -
solstice_ - 14.10.2018
Yeah and that's not the only mistake, read out carefully what I wrote, don't just ignore everything.
Re: [MySQL - R41]: Dynamic teleports system - FixFl0w -
FixFl0w - 14.10.2018
I did it, and I took your recommendations into account, thank you very much.
Re: [MySQL - R41]: Dynamic teleports system - FixFl0w -
Marshmello - 19.10.2018
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
Re: [MySQL - R41]: Dynamic teleports system - FixFl0w -
FixFl0w - 20.10.2018
Quote:
Originally Posted by Marshmello
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
Re: [MySQL - R41]: Dynamic teleports system - FixFl0w -
Chaprnks - 20.10.2018
Quote:
Originally Posted by willbedie
- 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"
Re: [MySQL - R41]: Dynamic teleports system - FixFl0w -
Cothect - 22.10.2018
The idea is good, but the code has errors...
- In the first line the comment is missing a
/.
- In the line 73 you load the interior but it does not set the interior for the player.
- In the
/deleteteleport command you should verify if the teleport exists.
Other things..
Код:
new enum {
SIN_USO,
DIALOG_TELESXD,
}
Why don't you use
0 instead of
SIN_USO?
Why don't you define the dialog id with
#define?
Код:
stock Nombre(playerid){
new namek[24];
GetPlayerName(playerid,namek,sizeof(namek));
return namek;}
You do not need to create a stock to use it once.
And.. the identation..
Ame los nombres de las variables