SA-MP Forums

Go Back   SA-MP Forums > SA-MP Scripting and Plugins > Scripting Help > Tutorials

Reply
 
Thread Tools Display Modes
Old 19/05/2018, 05:35 PM   #11
RogueDrifter
High-roller
 
RogueDrifter's Avatar
 
Join Date: Dec 2017
Location: SA-MP Drifting world.
Posts: 1,565
Reputation: 338
Default Re: Array out of bounds problem! [How to aknowledge and fix]

Quote:
Originally Posted by Verc View Post
Great.
It's 65535 by the way.
That wasn't my point overall ;D It isn't even that, it's the value outcome when it extracts this:
Code:
#define INVALID_PLAYER_ID (0xFFFF)
Into numbers,
But yeah you get my point ^^

Quote:
Originally Posted by Battlezone View Post
Mashallah
@Pottus your wish came true
I'm still alive!
__________________
Code:
I'm available to script stuff for cash PM me here or on discord @ Andy[RDZ]#0040
[Tutorial]:Anti-cheat guide ||Mini-game 101||VC/LC maps install||
Array index out of bounds


[Github]:Link [Pastebin]:Link [Forum]:Link [Server]:Link [Discord]:Link


RogueDrifter is offline   Reply With Quote
Old 19/05/2018, 06:08 PM   #12
JasonRiggs
Gangsta
 
Join Date: Jul 2016
Location: My bedroom.
Posts: 744
Reputation: 39
Default Re: Array out of bounds problem! [How to aknowledge and fix]

Quote:
Originally Posted by RogueDrifter View Post
I'm still alive!
Did anyone say that you're dead?

Good tutorial overthere
__________________


Discord: Riggs ™#5210
JasonRiggs is offline   Reply With Quote
Old 19/05/2018, 06:28 PM   #13
RogueDrifter
High-roller
 
RogueDrifter's Avatar
 
Join Date: Dec 2017
Location: SA-MP Drifting world.
Posts: 1,565
Reputation: 338
Default Re: Array out of bounds problem! [How to aknowledge and fix]

Quote:
Originally Posted by JasonRiggs View Post
Did anyone say that you're dead?

Good tutorial overthere
I was hinting to the fact that last time i posted something was a month ago, and thanks.
__________________
Code:
I'm available to script stuff for cash PM me here or on discord @ Andy[RDZ]#0040
[Tutorial]:Anti-cheat guide ||Mini-game 101||VC/LC maps install||
Array index out of bounds


[Github]:Link [Pastebin]:Link [Forum]:Link [Server]:Link [Discord]:Link


RogueDrifter is offline   Reply With Quote
Old 19/05/2018, 08:58 PM   #14
Y_Less
Spam Machine
 
Y_Less's Avatar
 
Join Date: Jun 2008
Location: 629 - git.io/Y
Posts: 14,895
Reputation: 3126
Default Re: Array index out of bounds problem! [How to acknowledge and fix]

Quote:
Originally Posted by RogueDrifter View Post
So the array of that variable is 20 cells, 19 for usage and 1 for null.
That's wrong. Only strings need NULL terminators - arrays don't.
Y_Less is offline   Reply With Quote
Old 20/05/2018, 06:27 AM   #15
RogueDrifter
High-roller
 
RogueDrifter's Avatar
 
Join Date: Dec 2017
Location: SA-MP Drifting world.
Posts: 1,565
Reputation: 338
Default Re: Array index out of bounds problem! [How to acknowledge and fix]

Quote:
Originally Posted by Y_Less View Post
That's wrong. Only strings need NULL terminators - arrays don't.
Ah i get you, i was a bit confused cuz the way to declare a normal variable for use/a string in pawn is the same, overall i edited the part, thanks!
__________________
Code:
I'm available to script stuff for cash PM me here or on discord @ Andy[RDZ]#0040
[Tutorial]:Anti-cheat guide ||Mini-game 101||VC/LC maps install||
Array index out of bounds


[Github]:Link [Pastebin]:Link [Forum]:Link [Server]:Link [Discord]:Link


RogueDrifter is offline   Reply With Quote
Old 20/05/2018, 09:35 PM   #16
Marllun
Gangsta
 
Marllun's Avatar
 
Join Date: Oct 2016
Location: Brazil
Posts: 861
Reputation: 32
Default Re: Array out of bounds problem! [How to aknowledge and fix]

good (:
__________________
Code:
Discord: Marllun#6297
Marllun is offline   Reply With Quote
Old 20/05/2018, 10:03 PM   #17
Calgon
Godfather
 
Calgon's Avatar
 
Join Date: Jan 2009
Posts: 6,487
Reputation: 1126
Default Re: Array out of bounds problem! [How to aknowledge and fix]

Your explanation for array index out of bounds is silly, if you’re going to talk about null terminators which you would only need to use if you’re using a string not an >array< then you should explain everything fully, not just a random non fitting brief paragraph. You should properly tie in your explanation for why trying to use array[20] won’t work as that is more important anyway.

The code example for invalid values does not make sense when trying to read write some better pseudo code if you want to explain it, i.e: actually fill out the function headers and write a better example.

You have really drawn this tutorial out when you could have provided a really simple and easy to understand explanation with some use cases/examples of how to find and fix the issues.

Maybe focus on planning your next tutorial a little more as this is a bit of a mess.

Also *acknowldge
Calgon is offline   Reply With Quote
Old 20/05/2018, 10:12 PM   #18
RogueDrifter
High-roller
 
RogueDrifter's Avatar
 
Join Date: Dec 2017
Location: SA-MP Drifting world.
Posts: 1,565
Reputation: 338
Default Re: Array out of bounds problem! [How to aknowledge and fix]

Quote:
Originally Posted by Calgon View Post
Your explanation for array index out of bounds is silly, if you’re going to talk about null terminators which you would only need to use if you’re using a string not an >array< then you should explain everything fully, not just a random non fitting brief paragraph. You should properly tie in your explanation for why trying to use array[20] won’t work as that is more important anyway.

The code example for invalid values does not make sense when trying to read write some better pseudo code if you want to explain it, i.e: actually fill out the function headers and write a better example.

You have really drawn this tutorial out when you could have provided a really simple and easy to understand explanation with some use cases/examples of how to find and fix the issues.

Maybe focus on planning your next tutorial a little more as this is a bit of a mess.

Also *acknowldge
Quote:
Your explanation for array index out of bounds is silly
No you.

Quote:
if you’re going to talk about null terminators which you would only need to use if you’re using a string not an >array< then you should explain everything fully,
That was sorted out in the comment above you, that was not the purpose of the tutoiral.

Quote:
You should properly tie in your explanation for why trying to use array[20] won’t work as that is more important anyway.
I already did by saying that the cells count starts at 0 which still leaves 20 cells counting 0 til 19, you seem to be the only one confused about it ;D

Quote:
The code example for invalid values does not make sense when trying to read write some better pseudo code if you want to explain it, i.e: actually fill out the function headers and write a better example.
You say make it short but want me to start declaring the variables which makes it long = no sense.
I explained it in plain text, couldn't be more simple ;-)

Quote:
You have really drawn this tutorial out when you could have provided a really simple and easy to understand explanation with some use cases/examples of how to find and fix the issues.
Of course it can be easy, it actually is easy, array index out of bounds, you typed a cell number in the array that was over the boundaries(maximum number of the cell numbers [array bounds]) but they still don't get it when the server logs say it, examples tend to let you be more cautious ;-)
Quote:
Maybe focus on planning your next tutorial a little more as this is a bit of a mess.
Okay daddy <3
__________________
Code:
I'm available to script stuff for cash PM me here or on discord @ Andy[RDZ]#0040
[Tutorial]:Anti-cheat guide ||Mini-game 101||VC/LC maps install||
Array index out of bounds


[Github]:Link [Pastebin]:Link [Forum]:Link [Server]:Link [Discord]:Link


RogueDrifter is offline   Reply With Quote
Old 20/05/2018, 10:15 PM   #19
Calgon
Godfather
 
Calgon's Avatar
 
Join Date: Jan 2009
Posts: 6,487
Reputation: 1126
Default Re: Array out of bounds problem! [How to aknowledge and fix]

It’s a chore to read if you’re the sort of scripter who needs a tutorial for this then the tutorial should be simply written, in a way this level of scripter can easily understand. Right now it doesn’t seem friendly for that type of crowd. There’s lots of fat you can trim in your writing to make it easier to understand.
Calgon is offline   Reply With Quote
Old 20/05/2018, 10:17 PM   #20
RogueDrifter
High-roller
 
RogueDrifter's Avatar
 
Join Date: Dec 2017
Location: SA-MP Drifting world.
Posts: 1,565
Reputation: 338
Default Re: Array out of bounds problem! [How to aknowledge and fix]

Quote:
Originally Posted by Calgon View Post
It’s a chore to read if you’re the sort of scripter who needs a tutorial for this then the tutorial should be simply written, in a way this level of scripter can easily understand. Right now it doesn’t seem friendly for that type of crowd. There’s lots of fat you can trim in your writing to make it easier to understand.
More explanations = more understanding with more examples
Less explanations shortened down to few complex words/sentences = more complaints

Of course you don't need to read the full tutorial to understand what the problem is, its basiaclly explained in the first few lines, the examples are just little extras i found myself to help out more :)
__________________
Code:
I'm available to script stuff for cash PM me here or on discord @ Andy[RDZ]#0040
[Tutorial]:Anti-cheat guide ||Mini-game 101||VC/LC maps install||
Array index out of bounds


[Github]:Link [Pastebin]:Link [Forum]:Link [Server]:Link [Discord]:Link


RogueDrifter is offline   Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
array index out of bounds problem ohmy Scripting Help 4 22/12/2014 09:18 AM
Array Out of bounds problem IceBilizard Scripting Help 0 13/12/2014 12:35 PM
[HELP] Problem with (array index out of bounds) GBLTeam Scripting Help 2 20/11/2014 10:12 PM
[Help]Array index out of bounds Problem Mamal75 Scripting Help 23 16/10/2014 12:27 PM
[Array index out of bounds] problem. rappy93 Scripting Help 24 17/05/2014 09:37 PM


All times are GMT. The time now is 08:17 PM.


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