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: Y_Less
Forum: Scripting Help 17/08/2018, 10:19 AM
Replies: 5
Views: 58
Posted By Y_Less
Forum: Includes 17/08/2018, 12:57 AM
Replies: 7
Views: 299
Posted By Y_Less
Re: strcalc.inc - A simple string calculator

I tried three random tests. All three failed:

"(5 * 5) - 1"

Expected: 24, Got: -1

"(5 - 1) * (5 - 1)"

Expected: 16, Got: 0
Forum: Scripting Help 16/08/2018, 04:51 PM
Replies: 4
Views: 60
Posted By Y_Less
Re: if.... not detected ???

The if might succeed, but then the other code is still run. You need an `else if` after the ban check, or a `return` within in, both prevent further processing.
Forum: Scripting Help 16/08/2018, 04:41 PM
Replies: 9
Views: 163
Posted By Y_Less
Re: top 3 players by damage

Get md-sort, it sorts players by any defined criteria and then you can just take the first three.
Forum: Scripting Help 16/08/2018, 04:39 PM
Replies: 4
Views: 60
Posted By Y_Less
Re: if.... not detected ???

There is really not enough code there to be able to tell the problem.You haven't even really explained the problem - what happens and what do you expect to happen?

I will say that code doesn't...
Forum: Scripting Help 16/08/2018, 10:46 AM
Replies: 4
Views: 88
Posted By Y_Less
Re: "case:" statement error!

How is Shop8 defined? It must be an enum, define, or constant, to be used in case.
Forum: Scripting Help 16/08/2018, 10:44 AM
Replies: 8
Views: 91
Posted By Y_Less
Re: Dialog

strcat can't do formatting options, only format can.
Forum: Scripting Help 16/08/2018, 10:36 AM
Replies: 8
Views: 145
Posted By Y_Less
Re: Y_ini strange saving and loading problem

You can't have spaces in keys.



Then you need a history lesson. Short version: SA-MP hasn't always had databases. Plus where else are you going to store database credentials?
Forum: Scripting Help 15/08/2018, 07:20 PM
Replies: 7
Views: 95
Posted By Y_Less
Re: Make a total

Did you just seriously ask how to add two numbers together?

It is an amazing operation called "plus":

+
Forum: Scripting Help 15/08/2018, 12:46 PM
Replies: 9
Views: 206
Posted By Y_Less
Re: Gamemode in the includes

Be careful with long paths, you might need to shrink them to under 32 characters.
Forum: Scripting Help 15/08/2018, 12:44 PM
Replies: 10
Views: 272
Posted By Y_Less
Re: 1K instead of 1000

They might not write 10k10k, but 5k2 is valid and common in EE.
Forum: Scripting Help 14/08/2018, 05:12 PM
Replies: 15
Views: 273
Posted By Y_Less
Re: Player color changed every secdon!

That's the exact opposite of what you should be doing! Start a new timer.
Forum: Scripting Help 14/08/2018, 04:12 PM
Replies: 8
Views: 163
Posted By Y_Less
Forum: Scripting Help 14/08/2018, 02:09 PM
Replies: 8
Views: 163
Posted By Y_Less
Re: Attempted to read/write array element at negative index -400

Use y_vehicledata, it has protection against oob.
Forum: Scripting Help 13/08/2018, 12:57 PM
Replies: 5
Views: 85
Posted By Y_Less
Re: KillTimer doesnt work...

My guess would be you need an array of timers, as you probably keep overwriting that variable for each player.

Also: A handy hint for the future. When you are writing code and it doesn't work,...
Forum: Scripting Help 11/08/2018, 12:36 AM
Replies: 5
Views: 153
Posted By Y_Less
Re: Server crashed and I don't know why..

Sew_Sumi listed about five things for you to detail, that was only the first one.
Forum: Scripting Help 10/08/2018, 11:44 AM
Replies: 3
Views: 77
Posted By Y_Less
Re: Help me. again. again.

Just use zcmd, you can't use both.
Forum: Scripting Help 10/08/2018, 08:39 AM
Replies: 11
Views: 222
Posted By Y_Less
Re: Query string

Ahh, I actually missed the mention of ' (single quote) in the post - that does make a (tiny) difference.
Forum: Scripting Help 10/08/2018, 07:58 AM
Replies: 11
Views: 222
Posted By Y_Less
Re: Query string

What?

I've heard a lot of rubbish claims about "performance" on these forums over the years. People with wild ideas about what is slow and what is fast, always with no evidence to support their...
Forum: Scripting Help 08/08/2018, 01:51 PM
Replies: 4
Views: 136
Posted By Y_Less
Re: prototype Help

Maybe explain what you want, instead of just assuming everyone knows and then complaining that no-one is helping.
Forum: Scripting Help 06/08/2018, 01:11 PM
Replies: 6
Views: 176
Posted By Y_Less
Re: Spawn nearest hospital

You use SetSpawnInfo not SetPlayerPos.
Forum: Scripting Help 06/08/2018, 05:57 AM
Replies: 10
Views: 156
Posted By Y_Less
Re: HELP, MY CODE DOES NOT APPEAR!!!!

Yes, do what I said - load a recent commit (assuming you pushed).
Forum: Scripting Help 06/08/2018, 01:08 AM
Replies: 10
Views: 156
Posted By Y_Less
Re: HELP, MY CODE DOES NOT APPEAR!!!!

Don't worry - just go back to a recent backup/commit. You'll loose about an hour of work, but that's just the way it is I'm afraid when this happens.
Forum: Scripting Help 04/08/2018, 06:46 PM
Replies: 5
Views: 110
Posted By Y_Less
Re: Its difference using capital letters or not in Enum?

There is no difference, but there are conventions. So best is something like:


enum E_WHATEVER
{
E_WHATEVER_ONE,
E_WHATEVER_TWO,
E_WHATEVER_THREE,
}
Forum: Scripting Help 04/08/2018, 06:42 PM
Replies: 2
Views: 87
Posted By Y_Less
Showing results 1 to 25 of 500

 

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


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