Raised This Month: $ Target: $400
 0% 

error 009: Invalid array size.


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
Humming Bird
Junior Member
Join Date: May 2007
Old 06-03-2007 , 16:50   error 009: Invalid array size.
Reply With Quote #1

Hello, I'm getting a compiler error when I compile my code.

(note, i use "register_forward(FM_AlertMessage, "alertmessage", 1)")
(note2, i declare g_touchmap with "new g_touchmap[4][32]")

I also have bolded the line I get the error on - error 009: Invalid array size (negative or zero)

So anyone know what I'm doing wrong?

My code is as follows:
Code:
public alertmessage(atype, message[]) {
    if(containi(message,"force_map_") > -1) {
        new sstart = containi(message,"force_map_") + 10
        new empty[32]
        new forcemapstring[76]
        g_touchmap[0] = empty
        for(new i = sstart; i < (strlen(message) -2); i++) {
            g_touchmap[0][i - sstart] = message[i]
        }
        format(forcemapstring, 75, "Forcing map change to: %s", g_touchmap)
        msc_hudprint_all("Forcing Map", forcemapstring)
        client_print(0, print_console, "Forcing map change to: %s", g_touchmap)
        g_Answer = "dochangelevel %s"
        g_execLen = format(g_Execute,255,g_Answer,g_touchmap) + 1
        set_task(2.0, "delayedExec", 451986, g_Execute, g_execLen)
        
        return PLUGIN_HANDLED
    }
}

Last edited by Humming Bird; 06-03-2007 at 17:37.
Humming Bird is offline
 



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

Forum Jump


All times are GMT -4. The time now is 10:41.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode