View Single Post
PRoSToTeM@
Veteran Member
Join Date: Jan 2010
Location: Russia, Ivanovo
Old 01-07-2018 , 14:58   Re: [FAQ]armoury_entity
Reply With Quote #15

Quote:
Originally Posted by HamletEagle View Post
It's the coder job to properly check for return values. He gets burned once, then gets burned twice and finally he learns to look for the returned value.
Even pro coders from this forum forget to remove player task on client_disconnect, but it is a bit unrelated.
But IMO itemType check should throw an error, it's the coder job to use valid arguments (coder can validate args, but can't precontrol entity creation failure). Or return codes should be different, e.g entity creation failed is -1 and invalid itemType is -2, so you can differentiate them.

Quote:
Originally Posted by HamletEagle View Post
Kinda unrelated, this tutorial is about armoury_entity, why should I mention that weaponbox can have multiple weapons? It's mentioned in the proper place: https://forums.alliedmods.net/showthread.php?t=261464
This is written in the same paragraph with the comparison vs. weaponbox, so it sounds like armoury_entity can have multiple weapons, but weaponbox can't.
__________________

Last edited by PRoSToTeM@; 01-07-2018 at 15:02.
PRoSToTeM@ is offline
Send a message via ICQ to PRoSToTeM@ Send a message via Skype™ to PRoSToTeM@