SA-MP Forums

Go Back   SA-MP Forums > Search Forums

Showing results 1 to 25 of 421
Search took 0.02 seconds.
Search: Posts Made By: Calisthenics
Forum: Scripting Help 11/12/2018, 09:31 AM
Replies: 2
Views: 45
Posted By Calisthenics
Re: [debug] help

A function called in OnGameModeInit causes run time error 4. The value of vehicleid passed as index in a vehicle-array is 65535 which is INVALID_VEHICLE_ID. Either limit was reached (highly unlikely)...
Forum: Scripting Help 10/12/2018, 02:53 PM
Replies: 2
Views: 83
Posted By Calisthenics
Re: Help me with this command

Because HouseInfo goes out of bounds. Replace with MAX_HOUSES+1 with sizeof (HouseInfo) in the loop.
When a player is in range of a house, set their interior and position and stop the loop using...
Forum: Scripting Help 10/12/2018, 11:24 AM
Replies: 12
Views: 239
Posted By Calisthenics
Re: Vehicles Gang

Altus, NO_TEAM is defined as 255 which is a valid vehicleid. Replace with INVALID_VEHICLE_ID. CreateTeamVehicle is better to keep the same return values as AddStaticVehicle, INVALID_VEHICLE_ID for...
Forum: Scripting Help 08/12/2018, 01:12 PM
Replies: 5
Views: 90
Posted By Calisthenics
Re: How to load random file from folder?

If there are files with different extensions in that directory, you will need to check the last 4 characters (matching .map).

new dir: dHandle, item[40], type, counter, random_file;

dHandle =...
Forum: Scripting Help 07/12/2018, 10:00 PM
Replies: 5
Views: 90
Posted By Calisthenics
Re: How to load random file from folder?

An example using FileManager but it has to read once to retrieve how many files exist and a second to select the random one:

new dir: dHandle, item[40], type, counter, random_file;

dHandle...
Forum: Scripting Help 07/12/2018, 02:40 PM
Replies: 7
Views: 144
Posted By Calisthenics
Re: only letters

You need to loop from position 0 until string's length-1.
Check each character if it is in range of 'a' to 'z' OR 'A' to 'Z' using array index (in example text[i]).
But it is better to do it the...
Forum: Scripting Help 07/12/2018, 01:01 PM
Replies: 1
Views: 60
Posted By Calisthenics
Re: Plugins failed

Taken from FAQs of mysql plugin but they are required for streamer too.

Q: The plugin fails to load on Windows, how can I fix this?
A: You have to install these Microsoft C++ redistributables....
Forum: Scripting Help 07/12/2018, 12:54 PM
Replies: 7
Views: 146
Posted By Calisthenics
Re: Not saving stats [MYSQL]

Thank you, I did not notice. Your code still has the comma before WHERE clause though.



This is the reason I told you to always check mysql logs. It should inform you for my mistake:

[ERROR]...
Forum: Scripting Help 07/12/2018, 08:09 AM
Replies: 7
Views: 146
Posted By Calisthenics
Re: Not saving stats [MYSQL]

The count of placeholders does not match the count of arguments.


mysql_format(mysql, query, sizeof(query),
"UPDATE accounts \
SET Money = %d, \
PosX = %f, PosY = %f,...
Forum: Scripting Help 07/12/2018, 07:32 AM
Replies: 7
Views: 146
Posted By Calisthenics
Re: Not saving stats [MYSQL]

Error in syntax:

UPDATE `accounts` SET `Money` = '%d', ..., `Deaths` = '%d', WHERE `ID` = '%d'

Remove the comma before WHERE clause.

Always check mysql logs when something goes wrong with a...
Forum: Scripting Help 05/12/2018, 11:39 AM
Replies: 3
Views: 140
Posted By Calisthenics
Re: Mysql help.

Mysql plugin provides a log system for errors and warnings. The problem is that that Password and Gender (assuming ID is set as auto increment) do not have a default value so it throws an error.
...
Forum: Scripting Help 05/12/2018, 11:31 AM
Replies: 2
Views: 92
Posted By Calisthenics
Re: MySQL query first letter

PlayerInfo[playerid][pVorname] = Vorname[playerid];

Do not copy strings directly. Use strcpy instead.
Forum: Scripting Help 05/12/2018, 11:25 AM
Replies: 1
Views: 52
Posted By Calisthenics
Re: Help with error 029: invalid expression,

The problem is the parenthesis.

if(PlayerInfo[ playerid ][ xHelper ] >= 1 ) || (PlayerInfo[ playerid ][ xAdmin ] >= 1 ) || ( PlayerInfo[ playerid ][ xVIPLevel ] >= 1 ) || ( PlayerInfo[ playerid ][...
Forum: Includes 05/12/2018, 11:15 AM
Replies: 3
[Include] GeoLite
Views: 518
Posted By Calisthenics
Re: GeoLite

New version released!

Added IsIpProxy and IsPlayerUsingProxy functions.
Restructured tables for better compression.
Include:...
Forum: Server Support 04/12/2018, 11:40 AM
Replies: 7
Views: 150
Posted By Calisthenics
Re: Error SQL error #2059

Look for \xampp\mysql\bin folder. my.ini is also located there according to their FAQs.
Forum: Server Support 03/12/2018, 08:06 PM
Replies: 7
Views: 150
Posted By Calisthenics
Re: Error SQL error #2059

Find the path for mysql/bin folder. Run command prompt as administrator:

> cd path_to_folder\mysql\bin
> mysql -u user -p

Replace `user` with yours and enter the password when it asks for. As...
Forum: Server Support 03/12/2018, 06:43 PM
Replies: 7
Views: 150
Posted By Calisthenics
Re: Error SQL error #2059

PHP is not compatitible with caching_sha2_password method yet anyway. Connect to mysql server via command line and change your password:

ALTER USER 'user'@'host' IDENTIFIED WITH...
Forum: Scripting Help 11/11/2018, 08:38 PM
Replies: 23
Views: 354
Posted By Calisthenics
Re: Server Freezing.

If it unfreezes after a while, then it is not an infinite loop. It seems to me the problem is related to functions that take too long to execute mostly due to large chunks of code. Try Profiler...
Forum: Scripting Help 11/11/2018, 08:24 PM
Replies: 23
Views: 354
Posted By Calisthenics
Re: Server Freezing.

For more information (line), compile with -d3 flag: https://github.com/Zeex/samp-plugin-crashdetect/wiki/Compiling-scripts-with-debug-info

Currently without debug info we only know SaveUpdate...
Forum: Scripting Help 11/11/2018, 08:17 PM
Replies: 23
Views: 354
Posted By Calisthenics
Re: Server Freezing.

A run time error caused in `OnDialogResponse` callback would break the code execution and possibly have unexpected results. As long as crashdetect plugin is loaded, you will be able to know what the...
Forum: Scripting Help 11/11/2018, 07:59 PM
Replies: 23
Views: 354
Posted By Calisthenics
Re: Server Freezing.

Sscanf plugin and YSI library are outdated too. There may exist code-breaking changes after updating them, keep that in mind.

If the problem is caused by an infinite loop, updating your includes...
Forum: Scripting Help 11/11/2018, 07:51 PM
Replies: 23
Views: 354
Posted By Calisthenics
Re: Server Freezing.

Plugin version is 2.9.4 but include version is 2.6.1, they do not match. Open any script that uses streamer (filterscripts too) through the editor and re-compile again.
Forum: Scripting Help 11/11/2018, 07:47 PM
Replies: 23
Views: 354
Posted By Calisthenics
Re: Server Freezing.

Can you post your logs? It will show what version the include and the plugin are and from what script (if the warnings are given after loading a filterscript for example).
Forum: Scripting Help 11/11/2018, 07:43 PM
Replies: 23
Views: 354
Posted By Calisthenics
Re: Server Freezing.

The new parameters have a default value, therefore you do not modify your code. All you need to do is re-compile any script is using streamer with the same version of the plugin.
Forum: Scripting Help 11/11/2018, 07:36 PM
Replies: 23
Views: 354
Posted By Calisthenics
Re: Server Freezing.

First things first, update all includes and plugins to latest version because they are very outdated.

Install crashdetect plugin.

When the server stops responding or "hanging" (most likely an...
Showing results 1 to 25 of 421

 

All times are GMT. The time now is 04:34 PM.


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