SA-MP Forums

Go Back   SA-MP Forums > Search Forums

Showing results 1 to 25 of 500
Search took 0.02 seconds.
Search: Posts Made By: Calisthenics
Forum: Scripting Help 18/08/2019, 01:01 PM
Replies: 3
Views: 76
Posted By Calisthenics
Re: loading offline player data with mysql

Joins: https://dev.mysql.com/doc/refman/8.0/en/join.html

`OwnerID` should be foreign key. Post your table structures if you are still unaware.
Forum: Scripting Help 18/08/2019, 06:39 AM
Replies: 5
Views: 64
Posted By Calisthenics
Re: Help me

If you have MySQL, use datetime datatype + in-build date and time functions. Or else: https://github.com/Southclaws/pawn-chrono/
Forum: Scripting Help 17/08/2019, 09:03 PM
Replies: 14
Views: 184
Posted By Calisthenics
Re: Problem

Fixed all warnings and errors, updated for compiler version 3.10.9 for anyone interested:...
Forum: Scripting Help 17/08/2019, 06:49 PM
Replies: 14
Views: 184
Posted By Calisthenics
Re: Problem

I found the gamemode from github and I receive the same errors, plus about const-correctness since I am using the latest community compiler version. I will try to fix them.
Forum: Scripting Help 17/08/2019, 05:41 PM
Replies: 14
Views: 184
Posted By Calisthenics
Re: Problem

CTRL+G and goto those lines that give warning 219: local variable "info" shadows a variable at a preceding level. Rename info to another name as it it declared globally.

Rename regex_* functions...
Forum: Scripting Help 17/08/2019, 11:01 AM
Replies: 4
Views: 76
Posted By Calisthenics
Re: Problem AUTO_INCREMENT

I replied to this exact question few hours ago but apparently they decided to delete their thread.

So once again, auto increment makes sure in each row there is a unique identifier. Why do you...
Forum: Scripting Help 17/08/2019, 07:16 AM
Replies: 3
Views: 140
Posted By Calisthenics
Re: High CPU usage, please help me

In "hang" state, send SIGINT to the server process. Hopefully, you will get more details from crashdetect in case of infinite loop.

Next step is to profile it:...
Forum: Scripting Help 17/08/2019, 07:11 AM
Replies: 14
Views: 184
Posted By Calisthenics
Re: Problem

Use version 2.9.4 again and post the new errors. Older version will always give undefined error for dynamic actor functions and you will never be able to compile it.
Forum: Scripting Help 15/08/2019, 07:56 AM
Replies: 5
Views: 117
Posted By Calisthenics
Re: Debug Run time error 3

Creating huge local strings or in a case of recursion, run time 3 will be given.

The problem is not in dialog_sbizz2 but in OnDialogResponse callback. Post line 8477 and code around it.
Forum: Scripting Help 15/08/2019, 07:51 AM
Replies: 2
Views: 45
Posted By Calisthenics
Re: I Can't Compile My Gamemode

Is pawncc.exe blocked by the antivirus?
Forum: Scripting Help 14/08/2019, 07:10 AM
Replies: 6
Views: 110
Posted By Calisthenics
Re: Problem mysql

They mean you mistyped FROM to FORM.

Using LIMIT clause without ORDER BY will return different contacts of that player every time.

If you know the number, you can check if it exists in contacts...
Forum: Plugin Development 13/08/2019, 04:03 PM
Replies: 21
[Plugin] PawnPlus
Views: 6,692
Posted By Calisthenics
Re: PawnPlus

Great plugin!

I converted all const-arrays to dynamic strings but I am confused with arrays by reference. What I am trying to do is to get string value from mysql as dynamic.

native...
Forum: Scripting Help 13/08/2019, 07:58 AM
Replies: 4
Views: 103
Posted By Calisthenics
Re: Help List menu

Array indexes start from 0. If you use <=, it will give run time error 4 for accessing element at index 10 which is out of bounds.

Counting from 1 to 10 equals as if you count from 0 to 9. Both...
Forum: Scripting Help 12/08/2019, 12:38 PM
Replies: 1
Views: 59
Posted By Calisthenics
Re: [MySQL] cache_get_row_count: no active cache

mysql_tquery is for threaded queries. If you want to return the value directly (non-threaded), you have to use mysql_query.

For counting rows, you should use COUNT() aggregate function. `onwer_id`...
Forum: Scripting Help 11/08/2019, 08:57 AM
Replies: 8
Views: 167
Posted By Calisthenics
Re: Making new command.

I forgot to replace i with the array so replace with:

format(string, sizeof(string), "-%s %s (%d)", RPALN(admins[i]), RPNU(admins[i]), admins[i]);
Forum: Scripting Help 10/08/2019, 09:44 PM
Replies: 8
Views: 167
Posted By Calisthenics
Re: Making new command.

One way is 2 foreach loops, the other is 2 local arrays. I changed few mistakes you had (playerid to i) and will display messages only if admins or helpers are online.

Make sure you have...
Forum: Scripting Help 10/08/2019, 09:09 PM
Replies: 5
Views: 1,862
Posted By Calisthenics
Re: fatal error 100: cannot read from file

Run pawno.exe -> File tab -> Open option-> Select .pwn file
Forum: Scripting Help 10/08/2019, 08:30 AM
Replies: 13
Views: 315
Posted By Calisthenics
Re: Problem HouseInfo

The reason it does not show the new price is this:

HouseInfo[houseid][hPrice] = price;

You need the house index and not the id of the database. You can use a loop and check if houseid is equal...
Forum: Scripting Help 10/08/2019, 08:11 AM
Replies: 1
Views: 90
Posted By Calisthenics
Re: [Help] Include easy_mysql (3.7)

Compiler bug for strings in ternary operator. Either wrap them in parenthesis ("InnoDB") and ("latin5") or get the community compiler which has this and more bugs fixed.
...
Forum: Scripting Help 08/08/2019, 06:02 PM
Replies: 11
Views: 224
Posted By Calisthenics
Re: Vehicles don't destroy itself after user disconnect (I'm making a vehicle system using Y/ini)

1) Do not create the vehicle every time the player respawns, it will overwrite the variables and create more vehicles. It will remove the last but not any previous that its vehicleid was overwritten....
Forum: Scripting Help 08/08/2019, 05:21 PM
Replies: 3
Views: 113
Posted By Calisthenics
Re: HTTP error

It is better to use a plugin if you want to extract many of them.

https://github.com/Southclaws/pawn-requests


#include <a_samp>
#include <requests>

new RequestsClient: client;
Forum: Scripting Help 08/08/2019, 04:40 PM
Replies: 3
Views: 113
Posted By Calisthenics
Re: HTTP error

Without a XML/JSON plugin, it is easier to extract them in Pawn with json (api) format.

new bool: proxy, proxy_pos,
bool: vpn, vpn_pos;

proxy_pos = strfind(data, "\"proxy\":");
vpn_pos =...
Forum: Includes 08/08/2019, 01:46 PM
Replies: 9
Views: 542
Posted By Calisthenics
Re: Command Tags, Search, Usages and More

It's not only about size. Repeating groups are against 1NF which means there is no normalization in the database design.



Filesort is applied nearly at the end so scanning 10 rows and ordering...
Forum: Scripting Help 08/08/2019, 01:27 PM
Replies: 11
Views: 257
Posted By Calisthenics
Re: spaming messages idk why :/

It is only printed when the limit is reached (100 connected bots) and the timer is supposed to be killed. Using a constant value or a counter+1 does not make any difference.
Forum: Scripting Help 08/08/2019, 07:57 AM
Replies: 11
Views: 257
Posted By Calisthenics
Re: spaming messages idk why :/

The ID of the timer is wrong then.


KillTimer(ServerData[server_zombietimer]);


You create a repeated timer with callback `OnZombieCreate` and store its id in ServerData[server_zombietimer]?...
Showing results 1 to 25 of 500

 

All times are GMT. The time now is 09:57 AM.


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