SA-MP Forums

Go Back   SA-MP Forums > SA-MP Scripting and Plugins > Scripting Help > Help Archive

 
 
Thread Tools Display Modes
Old 30/08/2009, 08:03 PM   #1
Chaprnks
Gangsta
 
Chaprnks's Avatar
 
Join Date: Sep 2007
Location: Soviet America
Posts: 603
Reputation: 69
Default Script[gamemodes/****.amx]: Run time error 7: "Stack underflow"

Can someone explain more about this error? Never seen it before and there doesn't seem to be another post with this error code. The loading of the script was successful just a few minutes before. I've seen stack overflow, but not underflow.

Code:
SA:MP Dedicated Server
----------------------
v0.2X, (C)2005-2008 SA:MP Team

[15:57:17]
[15:57:17] Server Plugins
[15:57:17] --------------
[15:57:17] Loading plugin: dns.dll
[15:57:17]
*** DNS Plugin v2.2 by Incognito loaded ***

[15:57:17] Loaded.
[15:57:17] Loading plugin: ysf.dll
[15:57:17]

[15:57:17] ===============================
[15:57:17] YSF 0.2.00 loaded
[15:57:17] (c) 2008 Alex "******" Cole
[15:57:17] Server version: 0.2X
[15:57:17] Operating System: Windows
[15:57:17] ===============================

[15:57:17] Loaded.
[15:57:17] Loading plugin: mysql.dll
[15:57:17]

-------------------------------------
MySQL plugin has been loaded
Version: 1.0.3
Initialized on SA:MP Windows 0.2X
-------------------------------------

[15:57:17] Loaded.
[15:57:17] Loaded 3 plugins.

[15:57:17]
[15:57:17] Filter Scripts
[15:57:17] ---------------
[15:57:17] Loading filter script 'ostream.amx'...
[15:57:17] Loaded 1 filter scripts.

[15:57:18] Uptime: 1097905 Threads: 1 Questions: 367393 Slow queries: 0 Opens: 10167 Flush tables: 1 Open tables: 13 Queries per second avg: 0.334
[15:57:18] MySQL has been initialized and successfully loaded
[15:57:18] Script[gamemodes/****.amx]: Run time error 7: "Stack underflow"
__________________
Chaprnks is offline  
Old 30/08/2009, 08:42 PM   #2
paytas
Big Clucker
 
Join Date: Jul 2009
Posts: 89
Reputation: 0
Default Re: Script[gamemodes/****.amx]: Run time error 7: "Stack underflow"

http://en.wikipedia.org/wiki/Stack_(data_structure)
paytas is offline  
Old 31/08/2009, 04:16 AM   #3
Chaprnks
Gangsta
 
Chaprnks's Avatar
 
Join Date: Sep 2007
Location: Soviet America
Posts: 603
Reputation: 69
Default Re: Script[gamemodes/****.amx]: Run time error 7: "Stack underflow"

Quote:
Originally Posted by paytas
Thanks for attempting to help. I've tried to understand the underflow and overflow examples, although they don't seem to correspond with anything in pawno.

Code:
  int pop(STACK *ps)
  {
    if(empty(ps)){
      printf("Error: stack underflow");
      exit(EXIT_FAILURE);
    } else 
      return(ps->items[(ps->top)--]);
  }


  void push(int x, STACK *ps)
  {
    if(ps->top == STACKSIZE-1){
      printf("Error: stack overflow");
      exit(EXIT_FAILURE);
    } else 
      ps->items[++(ps->top)] = x;
      
    return;
  }
__________________
Chaprnks is offline  
 

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Run time error 20: "Invalid index parameter (bad entry Point" privacy94 Scripting Help 9 21/02/2012 03:56 PM
Run time error 7: "Stack underflow" Coicatak Help Archive 4 05/09/2010 07:54 AM
"Run time error 19: "File or function is not found" TouR Help Archive 2 18/06/2010 10:04 AM
Script[gamemodes/gd.amx]: Run time error 20: "Invalid index parameter DarkPower Help Archive 1 16/05/2010 05:48 PM
Admin script requires "ReturnUser", "strtok" and "IsNumeric" Rubennnnn Help Archive 1 02/12/2009 06:08 PM


All times are GMT. The time now is 04:34 AM.


Powered by vBulletin® Version 3.8.6
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.