PAWN Objects
Now.....i'm aware that pawn is a non-object oriented scripting language. So the closest thing you can get to that is either an array, including all the variables within the object, or a series of well documented variables.
Going along with the array way of doing things: Code:
new object[3][34]I suppose it all boils down to how to properly utilize a hanging(fringed} matrix....but pawn is so weird to me, and i'm out of proper practice with other languages. i think it looks pretty, but when compiling the compiler throws errors like "array size do not match; or destination size too small" |
Re: PAWN Objects
try use this
new object[10][100]; |
Re: PAWN Objects
just attempted your concept of large array sizes:
PHP Code:
referencing the "object[1][] " line |
Re: PAWN Objects
yes this can caused because you didn't specify anything on the 2nd dimmension of the array.
Try object[1]="ThatOneGuy"; |
Re: PAWN Objects
:shock: I could have sworn that didn't work when i tried it earlier.....but it compiled. Much thanks! will edit if i have any more problems when actually releasing it into the code i'm working on.
[EDIT] actually....while i have your attention: why is it the compiler doesn't like this Code:
const sz_command[] = "screenshot", i_ssCount = 32 |
Re: PAWN Objects
new const sz_command[] = { "Screenshot" };
A working example is, PHP Code:
|
Re: PAWN Objects
its all about that 'new' qualifier..... :x grumble.....
however....thanks, man! |
Re: PAWN Objects
Quote:
Also, you can't assign an array sized 32 to an array sized 34, IIRC. They have to be the same size. So, it is generally recommended to never assign arrays with "=" but to instead use copy(). |
Re: PAWN Objects
Quote:
and if you can't put a 32bit array in a 34, how would you propose to set up a fringed matrix? where there's isn't always the same number of columns in each row. or vise versa. refer to the visual example below.... Code:
[00 01 02 03 04] |
Re: PAWN Objects
Quote:
|
| All times are GMT -4. The time now is 07:50. |
Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.