SA-MP Forums Archive
I'm having difficulties with solving an error - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: I'm having difficulties with solving an error (/showthread.php?tid=508202)



I'm having difficulties with solving an error - AndySedeyn - 21.04.2014

Hello folks,
I'm having a bit of a problem here.
It gives me an error and I can't seem to find what causes it.

This is the line on which the error is:
pawn Код:
ProxDetector(30.0, playerid, string, COLOR_YELLOW,COLOR_YELLOW,COLOR_YELLOW,COLOR_YELLOW,COLOR_YELLOW, COLOR_YELLOW); // Players nearby see the message
This is the code:
Код:
(144) : error 029: invalid expression, assumed zero
This is the part where the ProxDetector is:
pawn Код:
new string[128];
    switch(reason)
    {
        case 0: format(string, sizeof(string), "* %s has left the server. (Timeout)", GetName(playerid));
        case 1: format(string, sizeof(string), "* %s has left the server. (Leaving)", GetName(playerid));
        case 2: format(string, sizeof(string), "* %s has left the server. (Kicked)", GetName(playerid));
    }
    ProxDetector(30.0, playerid, string, COLOR_YELLOW,COLOR_YELLOW,COLOR_YELLOW,COLOR_YELLOW,COLOR_YELLOW, COLOR_YELLOW); // Players nearby see the message
    return 1;
This is to say to nearby players for what reason the player is off the server.

Thanks in advance!