PDA

View Full Version : Define/stock question


IdonTmiss
15/07/2018, 11:09 AM
Well should i use , is it just the same or am i stupid?


stock Error(playerid, string[]) return va_SendClientMessage(playerid, RED_COLOR, "ERROR: {FFFFFF}%s", string);
//

//Then for a command

if(PlayerInfo[pAdmin] < 1) return Error(playerid, "U can't use this command!");

//or just like this
if(PlayerInfo[pAdmin] < 1) return va_SendClientMessage(playerid, RED_COLOR, "ERROR: U can't use this command!");

IdonTmiss
15/07/2018, 11:20 AM
Neither, this function doesn't need to be stock.

So just use this for commands and returns in them?


va_SendClientMessage(playerid, RED_COLOR, "ERROR: U can't use this command!");

IdonTmiss
15/07/2018, 11:31 AM
I'd suggest you spell "you" correctly, but otherwise yes. However, that's not quite what I meant - the `Error` function doesn't need `stock` before it.

I don't even use this in my script I mean the text, but thanks since I already reverted everything into the va_SendClient.. I'll leave it like that, Thanks ! :)

GhostHacker9
15/07/2018, 12:56 PM
I'd suggest you spell "you" correctly

I'd suggest you spell "why" correctly

Garr
15/07/2018, 01:52 PM
I don't even use this in my script I mean the text, but thanks since I already reverted everything into the va_SendClient.. I'll leave it like that, Thanks ! :)
He's saying you don't need to use the stock keyword. Just create a regular function lol.