Search

open.mp forum

RegisterLogin

Discussion

General
Chat
Tech
Life
Art
Programming
open.mp
Development Updates
Questions and Suggestions
SA-MP
General Discussions
Videos and Screenshots
Support
Pawn Scripting
Tutorials
Releases
Plugins
Libraries
Filterscripts
Gamemodes
Maps
Advertisements
Other languages
Spanish/Espa?ol
Programaci?n
Discusi?n GTA SA Multijugador
Mods
Offtopic
Juegos
Portuguese/Portugu?s
Russian/???????
Italian/Italiano
Dutch/Nederlands
German/Deutsch
Romanian/Rom?na
Ex-Yu
Polish/Polski
Og?lne
Serwery
Skryptowanie
Filmiki i zdjecia
Lithuanian/Lietuvi?kas
French/Fran?ais
Hungarian/Magyar
Hindi/Urdu
Turkish
Other
Internal
Team
Hidden
Archived

Library

 Collections Links Members Roles

Getting the size of an array

I have a multi-dimensional array, and I want to get the size of each line.

ID
d6ouivnilegovhg7bqgg
author
torque's avatar

Torque

@torque


View profile
Copy link
  Report member
started
Apr 16, 2021
replies
0
participating
No

scroll to top

powered by storyden

Login
Discussion
Pawn Scripting
Getting the size of an array
torque's avatar

Torque

@torque


View profile
Copy link
  Report member
• 5y
Pawn Scripting

Getting the size of an array

pawn

I have a multi-dimensional array, and I want to get the size of each line.

new BusRoutes[][] = {
? ? {0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10},
? ? {0, 11, 12, 13, 14, 15, 16, 17, 18, 19, 10}
};




new const MaxStops[] = sizeof(BusRoutes[]);



format(sStops, sizeof(sStops), "Stops: 0/%d", MaxStops[vRoute]);



If vRoute = 0, it works fine, but if it equals 1, the function crashes and it doesn't continue running the rest of the function. Something is wrong with MaxStops[vRoute] if vRoute equals anything other than 0.

What am I doing wrong?

0 likes0 replies

    Please sign up or log in to reply