Return d'une fonction stock.
#1

Bonsoir tout le monde, j'ai un petit problиme avec une fonction je ne trouve pas le return ... sыrement la fatigue :')
Vous pouvez m'aider s'il vous plaоt ?

Code:
stock MessageF(playerID, color, message[], { _, Float, Text3D, Menu, Text, DB, DBResult, bool, File, hex, bit, bit_byte, Bit }:...) { if (playerID == INVALID_PLAYER_ID) { return; } new targetString[256]; //new message[256]; //strcat(message, message2); new length = strlen(message); new argumentIndex = 2; for (new character = 0; character < length; character++) { new isFormatChar; if (message[character] == '%') { if (character + 1 < length) { switch (message[character + 1]) { case '%': { strcat(targetString, "%"); isFormatChar = true; } case 'c': { argumentIndex++; format(targetString, sizeof(targetString), "%s%c", targetString, getarg(argumentIndex)); isFormatChar = true; } case 'd': { argumentIndex++; format(targetString, sizeof(targetString), "%s%d", targetString, getarg(argumentIndex)); isFormatChar = true; } case 'f': { argumentIndex++; format(targetString, sizeof(targetString), "%s%f", targetString, getarg(argumentIndex)); isFormatChar = true; } case 's': { argumentIndex++; new string[256]; GetStringArg(argumentIndex, string); strcat(targetString, string); isFormatChar = true; } } } } if (isFormatChar) { character++; } else { format(targetString, sizeof(targetString), "%s%c", targetString, message[character]); } } SendClientMessage(playerID, color, targetString); }
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)