Thread: stats
View Single Post
Old 10-28-2010   #6
Mex
Registered User
 
Join Date: Nov 2008
Posts: 44
Mex is on a distinguished roadMex is on a distinguished roadMex is on a distinguished road
This line:
Code:
vaddCallback("onPlayerConnect", "onPlayerConnect_beer")
tells VLE to call onPlayerConnect_beer() when onPlayerConnect() is called.

In function onPlayerConnect_beer(PlayerID) you've got:
Code:
onPlayerConnect(PlayerID)
Which will call onPlayerConnect(), and cause infinite function calls:

VCO calls onPlayerConnect()

onPlayerConnect() calls onPlayerConnect_beer()
onPlayerConnect_beer() calls onPlayerConnect()

So basically you shouldn't call onPlayerConnect() inside a function which gets called when onPlayerConnect() is called.

Same with: onPlayerDeath(PlayerID,KillerID,WeaponID)
Mex is offline   Reply With Quote