mob/verb/ID_Ban(mob/M as mob in world)
IDBanList+=M.computer_id
del(M)
Problem description: IDBan.dm:2:error: M.computer_id: undefined var
ID:264686
Mar 22 2010, 12:44 pm
|
|
Code:
mob/verb/ID_Ban(mob/M as mob in world) Problem description: IDBan.dm:2:error: M.computer_id: undefined var |
Mar 22 2010, 12:46 pm
|
|
Mobs don't have computer IDs, clients do though.
|
In response to Stephen001
|
|
oh tnx.
mob/verb/ID_Ban(client/M as mob in world) That will work? o.O Edit: I'm using MySQL, php and DM. How i do the code checks for the comp id. |
In response to Gohan Games
|
|
Not really I think. One issue I can see is that mob in world will give you all mobs, players and other NPC mobs too. Either you want to check that M.client isn't null (NPCs and other mobs won't have a key associated with them) in the verb and act accordingly, or change the verb to get client/M as client in [some list of clients], but not world I think.
|
In response to Gohan Games
|
|
Gohan Games wrote:
Edit: I'm using MySQL, php and DM. How i do the code checks for the comp id. As long as you have loaded the list of banned ids into your IDBanList list, you would check in client new like so: client |
In response to Pirion
|
|
Pirion wrote:
(...)you would check in client new No, you wouldn't. world.IsBanned() is likely the better alternative, since that saves resource download and handling clients that you don't even want. |