SA-MP Forums

Go Back   SA-MP Forums > Search Forums

Showing results 1 to 25 of 500
Search took 0.04 seconds.
Search: Posts Made By: Kwarde
Forum: Scripting Help 05/08/2020, 12:44 AM
Replies: 1
Views: 55
Posted By Kwarde
Re: inline not getting called.

Make sure you're on the latest YSI. If you are, you don't need to include and use the mysql inline function. YSI has got this covered.
With the latest YSI (assuming you included...
Forum: Scripting Help 04/08/2020, 10:57 PM
Replies: 2
Views: 51
Posted By Kwarde
Re: warning 206: redundant test: constant expression is non-zero

That's because you're comparing two literal integers.
Keep in mind that the pre-processor changes the value of defines/macro's to their literal value. If USE_TEXTDRAW_SET is defined as 1, this is...
Forum: Scripting Help 04/08/2020, 04:39 PM
Replies: 4
Views: 89
Posted By Kwarde
Re: [HELP] a_http

It's possible that an include you are using is already either including a_http, or defined HTTP() itself. Either that or a_http is included multiple times yourself.
Add this on top of your a_http...
Forum: Scripting Help 04/08/2020, 12:42 AM
Replies: 10
Views: 272
Posted By Kwarde
Re: Fixing MySQL log Error

You are trying to insert (or inserting -if all columns may be NULL (thus NOT NULL not used)) a new row instead of updating the data of a row.

Also may I suggest you to store the IP as an integer?...
Forum: Scripting Help 03/08/2020, 05:49 PM
Replies: 15
Views: 730
Posted By Kwarde
Re: Saving&Loading 100 Variables

See this topic for some info on Y_INI (including how to load things); https://forum.sa-mp.com/showthread.php?t=570957
Forum: Scripting Help 03/08/2020, 03:38 PM
Replies: 10
Views: 272
Posted By Kwarde
Re: Fixing MySQL log Error

Sorry, when I meant "that the error is there", I meant are you absolutely sure they refer to the ban system? If there are no rows the cache_get functions aren't used so they are definitely somewhere...
Forum: Scripting Help 03/08/2020, 11:38 AM
Replies: 10
Views: 272
Posted By Kwarde
Re: Fixing MySQL log Error

Then are you sure that the error is there?
When using an "if (variable)" statement, it checks if the value is not 0 (so using "if (cache_num_rows() > 0)" does exactly the same as "if...
Forum: Scripting Help 01/08/2020, 05:57 PM
Replies: 5
Views: 136
Posted By Kwarde
Re: Register/login system doesn't working

server looks for a compiled, binary file (using file extension .amx). Make sure that "{$SERVER_ROOT}/gamemodes/Chroma-RPG.amx" exists and is readably by the server application.
Forum: Scripting Help 01/08/2020, 05:55 PM
Replies: 10
Views: 272
Posted By Kwarde
Re: Fixing MySQL log Error

When you see "invalid row index '0'" you can assume there is no row 0 (and thus no results).
Start debugging by printing the query to the server log/console.
Since there are no errors of a fault in...
Forum: Scripting Help 31/07/2020, 10:33 PM
Replies: 7
Views: 177
Posted By Kwarde
Re: Update Mysql :/

Alternatively you can use cache_get_value_index_float and cache_get_value_index_int

The cache_get functions return either 0 (failure) or 1 (success).
Example for cache_get_value_index_float (...
Forum: Scripting Help 30/07/2020, 08:50 PM
Replies: 5
Views: 203
Posted By Kwarde
Re: how to transform an Hex color to RBGA color

They are constants. The pre-processor changes them in the script to their actual value before compiling the script. They are indeed referred to as macro's aswell.

As for hexes/integers in...
Forum: Scripting Help 30/07/2020, 02:03 PM
Replies: 2
Views: 108
Posted By Kwarde
Re: inputtext problem

^ precisely that. Length of a string can never be below 0.
Checking if a string length is 0 or less than 0 is also quite useless (note: this would work for checking for empty inputs most of the...
Forum: Scripting Help 27/07/2020, 01:27 PM
Replies: 4
Views: 232
Posted By Kwarde
Re: Mysql 41-4 Cache error help

When there is no cache it usually means your query didn't come with a result set. Make sure to check if there are rows, eg.

mysql_tquery(mysqlHandle, "SELECT * FROM users WHERE name = 'someName'",...
Forum: Filterscripts 26/07/2020, 07:28 PM
Replies: 4,021
Views: 2,244,114
Posted By Kwarde
Re: Useful Functions

Function that prints a debug message to the console (using E_DEBUG prefix and appending filename and fileline where the function was used).
Does not print anything if ENABLE_DEBUGGING is not...
Forum: Scripting Help 22/07/2020, 03:05 PM
Replies: 8
Views: 250
Posted By Kwarde
Re: Is correct?

Why does it not load correctly? What's it stored like? And what's it like after being loaded?
Forum: Scripting Help 22/07/2020, 02:15 PM
Replies: 9
Views: 271
Posted By Kwarde
Re: my pwn file become NULL

You should never-ever shut down a system when there are opened documents, precisely to prevent these kind of things.
I see you are using Windows, you should enable the "File History" feature. This...
Forum: Scripting Help 22/07/2020, 02:11 PM
Replies: 8
Views: 250
Posted By Kwarde
Re: Is correct?

There are several things you could check:

> Is the data stored correctly?
- Did you use type DATETIME or INT? If you used DATETIME your query would either fail (UNIX timestamp isn't accepted for...
Forum: Scripting Help 18/07/2020, 01:30 AM
Replies: 4
Views: 215
Posted By Kwarde
Re: MySQL 41-4 || bans do not save on the db

Then check your mysql error log to see what's up. That's usually in {SAMP_ROOT}/logs/plugins/mysql.log

Tip: For date/time you can use column type DATETIME and insert value CURRENT_TIMESTAMP to it...
Forum: Scripting Help 18/07/2020, 12:57 AM
Replies: 4
Views: 215
Posted By Kwarde
Re: MySQL 41-4 || bans do not save on the db

You're using an UPDATE query. That is used to alter existing rows in a table and not to add new data. You most likely need to use an INSERT query.
Forum: Scripting Help 16/07/2020, 10:26 PM
Replies: 2
Views: 127
Posted By Kwarde
Re: Compile Error

If you're certain it's caused by an include not being included, check:

- That the variable you are trying to use it global and not local (defined as 'static' in lowest level)
- That #endinput is...
Forum: Scripting Help 16/07/2020, 10:21 PM
Replies: 6
Views: 203
Posted By Kwarde
Re: Please help me..

for(new h = 1; h < MAX_HOUSES; h++)
// >>
for(new h = 0; h < MAX_HOUSES; h++)
That change has nothing to do with going out of bounds of an array.
This loop runs as long as variable h is lower...
Forum: Scripting Help 16/07/2020, 10:17 PM
Replies: 5
Views: 181
Posted By Kwarde
Re: How to Load From Mysql

mysql_tquery() (threaded queries) required a callback to be called if you wish to work with the result set: https://wiki.sa-mp.com/wiki/MySQL#mysql_tquery
Forum: Scripting Help 15/07/2020, 01:37 PM
Replies: 4
Views: 180
Posted By Kwarde
Re: Cache MySQL

First of all, a few notes:

1- Threaded queries are indeed a better choice:
When using threaded queries, the server sends the query to the MySQL server and then proceeds the script. As soon as the...
Forum: Scripting Help 13/07/2020, 03:54 PM
Replies: 4
Views: 271
Posted By Kwarde
Re: Update MySQL

All the functions from the latest MySQL version can be found here:
https://wiki.sa-mp.com/wiki/MySQL

All the functions from MySQL R33 to R39-6 can be found here:...
Forum: Scripting Help 09/07/2020, 10:46 PM
Replies: 11
Views: 574
Posted By Kwarde
Re: Help /admins

Then one of these conditions is always true. I'm guessing you didn't access bytes but whole cells instead when setting the admin level.
Keep in mind the code I sent was merely an example of how I'd...
Showing results 1 to 25 of 500

 

All times are GMT. The time now is 10:42 PM.


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