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 10/08/2020, 09:00 PM
Replies: 3
Views: 134
Posted By Kwarde
Re: HOW is it possible, that this is always = 0?

Actually, no (@Proxus). floatround() returns an integer.

And honestly I've no idea why it does that. It's not like this calculation could reach cellmin or cellmax.
When approaching it this way:
...
Forum: Scripting Help 09/08/2020, 09:57 PM
Replies: 6
Views: 141
Posted By Kwarde
Re: mysql problem

Make sure that if other tables refer to account ID's (eg. houses table where account id = owner id) (which you should do like that and not by username) that all old data is gone. Eventual logs...
Forum: Scripting Help 09/08/2020, 07:58 PM
Replies: 7
Views: 271
Posted By Kwarde
Re: Increasing MySQL load performance

Why the hell would you do that? All the function does is load data from the database into local variables, and then CreateEntrance() is called with the loaded information.
If you remove...
Forum: Scripting Help 09/08/2020, 07:53 PM
Replies: 3
Views: 113
Posted By Kwarde
Re: Run time error 4: "Array index out of bounds"

Sidenote on xRadical3's suggestion:
-d2 should suffice too. -d3 does the same as -d2 except -d3 also implies -O0 (which disables optimalisations. That's -O1 by default (Only JIT optimalisations))
Forum: Scripting Help 07/08/2020, 05:35 PM
Replies: 3
Views: 135
Posted By Kwarde
Re: Help FOr /sethealth and /setarmour command

Don't forget to tell the string length to sscanf.
Forum: Scripting Help 06/08/2020, 10:50 AM
Replies: 5
Views: 178
Posted By Kwarde
Re: MySQL R41: Returning value to char arrays gives error

You can't do that.
Load the data from the database to a regular integer and then load it into the char array.
You could wrap it in a macro off course.

#define cache_get_value_int_char(%0,%1,%2)...
Forum: Scripting Help 06/08/2020, 10:47 AM
Replies: 5
Views: 79
Posted By Kwarde
Re: D:\Games\Chroma-rpg\pawno\Chroma-RPG.pwn(1039) : warning 225: unreachable code

ShadowMortar told you what's wrong. You've an extra bracket. He then provided a code on how it should look like. However you've more statements that should be in OnPlayerStateChange() which...
Forum: Scripting Help 05/08/2020, 12:44 AM
Replies: 1
Views: 73
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: 80
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: 104
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: 295
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: 16
Views: 791
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: 295
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: 295
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: 142
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: 295
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: 189
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: 210
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: 111
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: 242
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,246,357
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: 261
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: 276
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: 261
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: 224
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...
Showing results 1 to 25 of 500

 

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


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