Raised This Month: $ Target: $400
 0% 

Errors i dont know why


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
matsi
Thinkosaur
Join Date: Sep 2006
Old 05-15-2007 , 17:24   Errors i dont know why
Reply With Quote #1

I tried to make longjump here, but it wont compile.

PHP Code:
#include <amxmodx>
#include <fun>
#include <superheromod> 
PHP Code:
give_item(id"item_longjump"
Code:
Undefined symbol "item_longjump"
matsi is offline
yang
Veteran Member
Join Date: May 2005
Location: galoreservers.net
Old 05-15-2007 , 20:59   Re: Errors i dont know why
Reply With Quote #2

http://forums.alliedmods.net/showthread.php?t=13474
__________________

Last edited by yang; 05-15-2007 at 21:03.
yang is offline
Send a message via AIM to yang
matsi
Thinkosaur
Join Date: Sep 2006
Old 05-16-2007 , 07:19   Re: Errors i dont know why
Reply With Quote #3

[edit] No need this script anymore [/edit]

Last edited by matsi; 05-16-2007 at 09:55.
matsi is offline
NeogaidenX
Member
Join Date: Jul 2006
Old 05-16-2007 , 09:02   Re: Errors i dont know why
Reply With Quote #4

Hero: Frogger
has long jump.
__________________
NeogaidenX is offline
Rolnaaba
Veteran Member
Join Date: May 2006
Old 05-16-2007 , 09:29   Re: Errors i dont know why
Reply With Quote #5

you had indention errors:

Code:
public item_longjump(id) {  g_hasLongJump[id] = true  give_item(id, "item_longjump")         return PLUGIN_CONTINUE  }//dont need this bracket }

and:

Code:
public event_player_spawn(id) {  if ( gHasSuperPower[id] && is_user_alive(id) && shModActive() ) {  set_task(0.1, "item_longjump", id) }





you never closed the bracket of your if statement here...







This is fixed version:
Code:
/* Superhero plugin for crumbl13 *                               *  CVARS:                       *  crumb13_level - Default 0     ********************************/   #include <amxmodx> #include <fun> #include <superheromod>   #define MAX_PLAYERS 32   new bool:g_restart_attempt[MAX_PLAYERS + 1] new bool:g_hasLongJump[33] new gHeroName[]="Epic Crumbl3" new bool:gHasSuperPower[SH_MAXSLOTS+1]   public plugin_init() {    register_plugin("SUPERHERO Epic Crumb13", "1.1", "");    register_cvar("crumb13_level", "0"); //Set to 0 default :)    shCreateHero(gHeroName, "Hero Power List", "constant half-life super-jump", false, "Super_level"); //superheromod.inc: stock  shCreateHero(heroName[], heroPower[], heroHelp[], bool:requiresKeyEvents, heroLevel[])    register_srvcmd("Super_init", "Super_init");    shRegHeroInit(gHeroName, "Super_init");    register_event("ResetHUD", "event_hud_reset", "be")    register_clcmd("fullupdate", "clcmd_fullupdate")    register_event("DeathMsg", "death", "a")    register_event("TextMsg", "event_restart_attempt", "a", "2=#Game_will_restart_in") } //------------------------------------------------------------------------------------------------------------ public client_connect(id) {  g_hasLongJump[id] = false  return PLUGIN_HANDLED } //------------------------------------------------------------------------------------------------------------ public client_disconnect(id) {  g_hasLongJump[id] = false  return PLUGIN_HANDLED } //------------------------------------------------------------------------------------------------------------ public death() {  new id = read_data(2)  g_hasLongJump[id] = false } //------------------------------------------------------------------------------------------------------------ public Super_init() {  new temp[6];  read_argv(1,temp,5);  new id = str_to_num(temp);    read_argv(2,temp,5);    new hasPowers = str_to_num(temp);    gHasSuperPower[id] = (hasPowers != 0); } //------------------------------------------------------------------------------------------------------------ public clcmd_fullupdate() {  return PLUGIN_HANDLED_MAIN } //------------------------------------------------------------------------------------------------------------ public event_restart_attempt() {  new players[32], num  get_players(players, num, "a")  for (new i; i < num; ++i)   g_restart_attempt[players[i]] = true } //------------------------------------------------------------------------------------------------------------ public event_hud_reset(id) {  if (g_restart_attempt[id]) {   g_restart_attempt[id] = false   return  }  event_player_spawn(id) } //------------------------------------------------------------------------------------------------------------ public event_player_spawn(id) {  if ( gHasSuperPower[id] && is_user_alive(id) && shModActive() ) {   set_task(0.1, "item_longjump", id)  } }   //------------------------------------------------------------------------------------------------------------ public item_longjump(id) {  g_hasLongJump[id] = true  give_item(id, "item_longjump")  return PLUGIN_CONTINUE; } //------------------------------------------------------------------------------------------------------------
__________________
DO NOT PM me about avp mod.

Last edited by Rolnaaba; 05-16-2007 at 09:32.
Rolnaaba is offline
matsi
Thinkosaur
Join Date: Sep 2006
Old 05-16-2007 , 09:36   Re: Errors i dont know why
Reply With Quote #6

T4T! My first made hero, but this is not worth to publish thought.
matsi is offline
Rolnaaba
Veteran Member
Join Date: May 2006
Old 05-16-2007 , 09:43   Re: Errors i dont know why
Reply With Quote #7

oh and FYI you dont need to include fun and superheromod, superheromod include fun in it...
__________________
DO NOT PM me about avp mod.
Rolnaaba is offline
matsi
Thinkosaur
Join Date: Sep 2006
Old 05-16-2007 , 09:54   Re: Errors i dont know why
Reply With Quote #8

Quote:
Originally Posted by Rolnaaba View Post
oh and FYI you dont need to include fun and superheromod, superheromod include fun in it...
So superheromod has fun included already? Any other modules?
matsi is offline
vittu
SuperHero Moderator
Join Date: Oct 2004
Location: L.A. County, CA
Old 05-16-2007 , 18:14   Re: Errors i dont know why
Reply With Quote #9

Next time if you need help post the damn thing, or at least give the full error message. What you provided was not enough to supply any kind of answer other then you did something wrong.
vittu is offline
Send a message via AIM to vittu Send a message via MSN to vittu Send a message via Yahoo to vittu
Reply



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

Forum Jump


All times are GMT -4. The time now is 12:01.


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