AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   Run Time error (https://forums.alliedmods.net/showthread.php?t=129905)

edgaras85 06-18-2010 06:28

Run Time error
 
L 06/18/2010 - 13:17:28: [AMXX] Run time error 3: stack error
PHP Code:

if(Team == CS_TEAM_CT) {
switch(
random_num(13))
{
case 
1cs_set_user_model(id"model1");
case 
2cs_set_user_model(id"model2");
case 
3cs_set_user_model(id"model3");
}
}
else if(
Team == CS_TEAM_T){
cs_reset_user_model(id)



RedRobster 06-18-2010 15:21

Re: Run Time error
 
Put debug after the plugin name in the plugins.ini and post the results.

drekes 06-18-2010 15:27

Re: Run Time error
 
i think it already debugged, but not the full error

RedRobster 06-18-2010 15:45

Re: Run Time error
 
/off-topic Drekes did you use to play in SC servers? o.o I remember someone named Angel_Killer. haha

/topic :P Haha, I don't really know, but either way, we need to see the full results.

edgaras85 06-18-2010 16:11

Re: Run Time error
 
Now better? :D
Quote:

L 06/18/2010 - 13:17:28: [AMXX] Displaying debug trace (plugin "vip-deathrun.amxx")
L 06/18/2010 - 13:17:28: [AMXX] Run time error 3: stack error
L 06/18/2010 - 13:17:28: [AMXX] [0] vip-deathrun.sma::resetModel (line 85)

RedRobster 06-18-2010 17:04

Re: Run Time error
 
You didn't show us the right part of the code, I don't think.:shock:

edgaras85 06-18-2010 17:52

Re: Run Time error
 
Quote:

Originally Posted by RedRobster (Post 1212809)
You didn't show us the right part of the code, I don't think.:shock:

PHP Code:

public resetModel(idlevelcid) {
 new 
CsTeams:Team cs_get_user_team(id)   85Line
 
 
if(Team == CS_TEAM_CT) {
  switch(
random_num(13))
  {
    case 
1cs_set_user_model(id"model1");
    case 
2cs_set_user_model(id"model2");
   case 
3cs_set_user_model(id"model3");
  }
 }
 else if(
Team == CS_TEAM_T){
 
cs_reset_user_model(id)
 }
 return 
PLUGIN_CONTINUE



YamiKaitou 06-18-2010 17:56

Re: Run Time error
 
And which line is Line 85?

RedRobster 06-18-2010 18:07

Re: Run Time error
 
Well...beyond that, isn't cs_set_user_model() buggy?

edgaras85 06-18-2010 18:26

Re: Run Time error
 
Quote:

Originally Posted by YamiKaitou (Post 1212865)
And which line is Line 85?

PHP Code:

new CsTeams:Team cs_get_user_team(id

Quote:

Originally Posted by RedRobster (Post 1212871)
Well...beyond that, isn't cs_set_user_model() buggy?

PHP Code:

public plugin_precache() {
precache_model("models/player/model/model.mdl")
precache_model("models/player/model2/model2.mdl");
precache_model("models/player/model3/model3.mdl");
precache_generic("models/player/model2/model2T.mdl");


or maybe here bad?
PHP Code:

register_event("ResetHUD""resetModel""b"



All times are GMT -4. The time now is 14:48.

Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.