SA-MP Forums

Go Back   SA-MP Forums > Search Forums

Showing results 1 to 25 of 500
Search took 0.03 seconds.
Search: Posts Made By: Calisthenics
Forum: Server Support 25/05/2020, 10:00 PM
Replies: 4
Views: 33
Posted By Calisthenics
Re: Mysql successful but cant register/login in game?

logs\plugins for R40+ or mysql_log.txt/mysql_log.html for R33+

Note `mysql_log` should not be set to none.
Forum: Includes 25/05/2020, 09:27 PM
Replies: 23
Views: 4,356
Posted By Calisthenics
Re: Inline file loading

https://pastebin.com/raw/83dYkMp0
Forum: Server Support 25/05/2020, 09:19 PM
Replies: 4
Views: 33
Posted By Calisthenics
Re: Mysql successful but cant register/login in game?

Check mysql logs. If host is Linux, table names must be exact same because it is case-sensitive.
Forum: Includes 25/05/2020, 09:16 PM
Replies: 37
[Include] GeoLite
Views: 8,645
Posted By Calisthenics
Re: GeoLite

Database files in correct place, correct permissions to read from scriptfiles and connected (in case you use it on another player). Here is a sample with correct output:

#include <a_samp>...
Forum: Includes 25/05/2020, 08:32 PM
Replies: 37
[Include] GeoLite
Views: 8,645
Posted By Calisthenics
Re: GeoLite

`maxmind_country.db` and `maxmind_city.db` must be located in scriptfiles folder otherwise the functions will return 0.


GetPlayerCountry(playerid, PlayerInfo[playerid][GeoCountry],...
Forum: Scripting Help 21/05/2020, 07:22 AM
Replies: 4
Views: 131
Posted By Calisthenics
Re: warning 239: literal array/string passed to a non-const parameter

Remove standalone foreach and replace with YSI_Data\y_iterate (from YSI 5): https://forum.sa-mp.com/showpost.php?p=4127853&postcount=9

Update samp and pawn includes with fixed const-correctness:...
Forum: Scripting Help 21/05/2020, 07:11 AM
Replies: 6
Views: 149
Posted By Calisthenics
Re: mysql counting rows in accounts table

cache_get_field_content_int(0, registered, mysql);


native cache_get_field_content_int(row, const field_name[], connectionHandle = 1);

It expects a column name to search for but `registered`...
Forum: Scripting Help 16/05/2020, 07:53 AM
Replies: 2
Views: 76
Posted By Calisthenics
Re: Pawn.CMD

callcmd::call(playerid, numberphone);

`numberphone` should be string.
Forum: Scripting Help 13/05/2020, 08:54 AM
Replies: 1
Views: 66
Posted By Calisthenics
Re: MYSQL [ERROR] cache_get_row_int - invalid data type

`email` is not an integer.


//native cache_get_row(row, field_idx, destination[], connectionHandle = 1, max_len = sizeof(destination));
cache_get_row(0, 15, PlayerInfo[playerid][Email],...
Forum: Scripting Help 12/05/2020, 12:10 PM
Replies: 3
Views: 59
Posted By Calisthenics
Re: Mysql plugin error.

Wrong plugin version, load the latest: https://github.com/pBlueG/SA-MP-MySQL/releases
Forum: Scripting Help 09/05/2020, 03:07 PM
Replies: 5
Views: 78
Posted By Calisthenics
Re: Modular Programming Help y_hooks

Depends how you include the files, it can complain about files with same name (includes core.pwn only once and ignores other files with same name).


#include "core\player/player.pwn"



In...
Forum: Scripting Help 09/05/2020, 02:54 PM
Replies: 9
Views: 120
Posted By Calisthenics
Re: save amount

Do you sort `top_kills` array? Can you post the code?
Forum: Scripting Help 09/05/2020, 02:51 PM
Replies: 5
Views: 78
Posted By Calisthenics
Re: Modular Programming Help y_hooks

For YSI 5:

#include <YSI_Coding\y_hooks>


I use \ for path name and / for file name

#include "modules\server/database.pwn"
#include "modules\server/log.pwn"
#include...
Forum: Scripting Help 09/05/2020, 02:49 PM
Replies: 12
Views: 168
Posted By Calisthenics
Re: [ERROR] cache_get_row_int - invalid data type

Trying to fetch data that is not integer.
Forum: Scripting Help 09/05/2020, 02:08 PM
Replies: 9
Views: 120
Posted By Calisthenics
Re: save amount

If it is not shown at all, the formatting should not be the problem. You can try set textdraw string and re-show it.
Forum: Scripting Help 09/05/2020, 01:42 PM
Replies: 3
Views: 112
Posted By Calisthenics
Re: The compiler runs forever

Comment the last parts you changed if you remember until it responds (will compile or show errors/warnings). Then start un-commenting parts of code until you find the source of the problem.
Forum: Scripting Help 09/05/2020, 01:39 PM
Replies: 9
Views: 120
Posted By Calisthenics
Re: save amount

What do you mean it does not show up? The player-textdraw? Are you sure `PlayerTextDrawShow` is executed correctly when choosing a team?
Forum: Scripting Help 09/05/2020, 01:36 PM
Replies: 8
Views: 109
Posted By Calisthenics
Re: MySQL no active cache issue

When you execute another query (non-threaded) inside the callback, the cache is reset. You will have to re-apply it.

new rows = cache_num_rows();

if(rows)
{
new Cache: cache_id =...
Forum: Scripting Help 09/05/2020, 01:27 PM
Replies: 8
Views: 109
Posted By Calisthenics
Re: MySQL no active cache issue

Might be an issue with how you display the data? Post full mysql logs and code.
Forum: Scripting Help 09/05/2020, 01:24 PM
Replies: 9
Views: 163
Posted By Calisthenics
Re: Problem load player password from database takes long time

Create UNIQUE INDEX for `playername` column and set log to ERROR | WARNING.
Forum: Scripting Help 09/05/2020, 01:20 PM
Replies: 5
Views: 78
Posted By Calisthenics
Re: Modular Programming Help y_hooks

1. Can you post the main file that includes core.pwn? What version of YSI?
2. https://github.com/pawn-lang/compiler/wiki/File-Inclusion
Forum: Scripting Help 09/05/2020, 01:15 PM
Replies: 9
Views: 120
Posted By Calisthenics
Re: save amount

`TotalDMG` should have Float: tag

PlayerInfo[playerid][TotalDMG] += amount;
// is equivalent to
PlayerInfo[playerid][TotalDMG] = PlayerInfo[playerid][TotalDMG] + amount;
Forum: Scripting Help 09/05/2020, 01:13 PM
Replies: 8
Views: 109
Posted By Calisthenics
Re: MySQL no active cache issue

If the cache was not active, `LoadBounties` would not be called. But I have seen it again I think, for an unknown reason `cache_num_rows` returned different results according to that author.

For...
Forum: Scripting Help 06/05/2020, 10:20 AM
Replies: 2
Views: 79
Posted By Calisthenics
Re: Unused Callbacks

Yes, you can. They are called only when they are defined in the script.
Forum: Includes 06/05/2020, 10:13 AM
Replies: 37
[Include] GeoLite
Views: 8,645
Posted By Calisthenics
Re: GeoLite

Databases were updated for May 2020: https://github.com/George480/geolite/releases/tag/v19.0
Showing results 1 to 25 of 500

 

All times are GMT. The time now is 12:29 AM.


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