SA-MP Forums

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

Reply
 
Thread Tools Display Modes
Old 31/03/2012, 02:20 AM   #1
2KY
Gangsta
 
2KY's Avatar
 
Join Date: Jan 2012
Location: United States
Posts: 950
Reputation: 166
Default Array help :3

I'm new at creating arrays, and I'm trying to create a valid skin array, and integrate it into my mode. I'm using Y_Classes, and I'm running into a problem with the array (I'm assuming, it very well could be me misusing y_classes)

pawn Code:
new
    ValidModels [ ] [ 1 ] = {
        { 1 }
    };

pawn Code:
public OnGameModeInit()
{
    for( new model; model < sizeof( ValidModels ); model ++ )
    {
        ValidModels [ model ] [ 0 ] = Class_Add( model, 255.0, 0.0, 10.0, 0.0 );
    }
    return 1;
}

public OnGameModeExit()
{
    for( new model; model < sizeof( ValidModels ); model ++ )
    {
        Class_Delete( ValidModels [ model ] [ 0 ] );
    }
    return 1;
}
__________________
Check out my wiki page
2KY is offline   Reply With Quote
Old 31/03/2012, 02:53 AM   #2
MP2
Godfather
 
MP2's Avatar
 
Join Date: Jan 2011
Location: England
Posts: 6,219
Reputation: 976
Default Re: Array help :3

I don't think you need to delete them under OnGameModeExit..
__________________
Click banner above for more info. View trailers here.
Enter referral code SAMPFORUM after registering for a $5000 starting bonus!
MP2 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
(dFile) error 047: array sizes do not match, or destination array is too small Jack_Leslie Scripting Help 0 06/09/2011 01:20 AM
(dFile) error 047: array sizes do not match, or destination array is too small Jack_Leslie Scripting Help 8 01/09/2011 05:32 AM
[HELP]: error 047: array sizes do not match, or destination array is too small txt_16 Help Archive 2 17/07/2011 09:24 AM
[SOLVED]error 047: array sizes do not match, or destination array is too small help! Help Archive 7 18/06/2011 08:09 PM
[Sloved]error 047: array sizes do not match, or destination array is too small CoaPsyFactor Help Archive 1 09/06/2011 08:27 PM


All times are GMT. The time now is 11:24 PM.


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