SA-MP Forums

SA-MP Forums (https://forum.sa-mp.com/index.php)
-   Scripting Help (https://forum.sa-mp.com/forumdisplay.php?f=12)
-   -   Help with Messages (https://forum.sa-mp.com/showthread.php?t=322454)

Dark Crow 02/03/2012 11:48 AM

Help with Messages
 
MIstake by me so sry it was a simple error i didn't saw it -Removed

Gamer_Z 02/03/2012 11:53 AM

Re: Help with Messages
 
array entries should be separated by a comma, the last entry not. eg:

pawn Code:
new HelloWorld[10] = {0,1,2,3,4,5,6,7,8,9};
//is just the same like:
new HelloWorld[10] =
{
    0,
    1,
    2,
    3,
    4,
    5,
    6,
    7,
    8,
    9//no comma
};
//and if you need to do it with strings:
new HelloWorld[10][32] = //10 is the amount of entries, 32 the max string size
{
    "abc",
    "def",
    "ghi",
    "jkl",
    "mno",
    "pqr",
    "stu",
    "vwx",
    "yz",
    "abcdefghijklmnopqrstuvwxyz"//no comma
};
//and removed some entries:
new HelloWorld[7][32] =
{
    "abc",
    "def",
    "ghi",
    "jkl",
    "mno",
    "stu",
    "vwx"//no comma
};

however (not related to the topic) enumerators may have the last entry ending with a comma.


All times are GMT. The time now is 04:20 AM.

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