Raised This Month: $51 Target: $400
 12% 

Help me!


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
[[MKT]]Yod@
Member
Join Date: Jan 2005
Location: Denmark
Old 03-12-2005 , 18:54   Help me!
Reply With Quote #1

Can someone help me with my hero?

I got these errors when i try compile it:

sh_wallmaker.sma<170> : error 001: expected token: "/*", but found "-end of file-"
sh_wallmaker.sma<170> : error 013: no entry point <no public functions>

Can somebody help me with that?

here's the sma
Attached Files
File Type: sma Get Plugin or Get Source (sh_wallmaker.sma - 101 views - 4.8 KB)
File Type: sma Get Plugin or Get Source (sh_wallmaker.sma - 82 views - 4.8 KB)
__________________
WTF? Finnally No LAgg Server!!..Yea...!?
[[MKT]]Yod@ is offline
Send a message via MSN to [[MKT]]Yod@
Extremeone
Senior Member
Join Date: Jan 2005
Old 03-12-2005 , 19:49  
Reply With Quote #2

alright its done but it has a warning

Code:
// Wall Maker! - Making Walls ppl cant get through unless using noclip heroes /* CVARS - copy and paste to shconfig.cfg //Wall Maker wallmaker_level 5 wallmaker_cooldown 0        //Cooldown time from wall setting to do it again wallmaker_walls 3         //How Many walls does he start with */ #include <amxmod> #include <Vexd_Utilities> #include <superheromod> // GLOBAL VARIABLES new gHeroName[]="Wall Maker" new bool:gHasWallmakerPower[SH_MAXSLOTS+1] new wallmakerentity[SH_MAXSLOTS + 1], wallammo[SH_MAXSLOTS + 1] new gPlayerLevels[SH_MAXSLOTS+1] new wallmodel[32] //---------------------------------------------------------------------------------------------- public plugin_init() {     // Plugin Info     register_plugin("SUPERHERO Wall Maker","1.0","-[SHT]-b!nk")     // DO NOT EDIT THIS FILE TO CHANGE CVARS, USE THE SHCONFIG.CFG     register_cvar("wallmaker_level", "0" )     register_cvar("wallmaker_cooldown", "0" )     register_cvar("wallmaker_walls", "3" )     // FIRE THE EVENT TO CREATE THIS SUPERHERO!     shCreateHero(gHeroName, "WallMaker", "Press +power button to place a Wall", true, "wallmaker_level" )     // REGISTER EVENTS THIS HERO WILL RESPOND TO! (AND SERVER COMMANDS)     register_event("ResetHUD","newRound","b")     // KEY DOWN     register_srvcmd("wallmaker_kd", "wallmaker_kd")     shRegKeyDown(gHeroName, "wallmaker_kd")     // INIT     register_srvcmd("wallmaker_init", "wallmaker_init")     shRegHeroInit(gHeroName, "wallmaker_init")     // LEVELS     register_srvcmd("wallmaker_levels", "wallmaker_levels")     shRegLevels(gHeroName,"wallmaker_levels") } //---------------------------------------------------------------------------------------------- public plugin_precache() {         precache_model("models/wall.mdl") } //---------------------------------------------------------------------------------------------- public wallmaker_init() {     // First Argument is an id     new temp[6]     read_argv(1,temp,5)     new id=str_to_num(temp)     // 2nd Argument is 0 or 1 depending on whether the id has Wall Maker's powers     read_argv(2,temp,5)     new hasPowers=str_to_num(temp)     gHasWallmakerPower[id] = (hasPowers!=0)     if (gHasWallmakerPower[id]) newRound(id) } //---------------------------------------------------------------------------------------------- public newRound(id) {     gPlayerUltimateUsed[id] = false     if (!gHasWallmakerPower[id]) return PLUGIN_CONTINUE     if (wallmakerentity[id]) {         RemoveEntity(wallmakerentity[id])         wallmakerentity[id] = 0     }     return PLUGIN_CONTINUE } //---------------------------------------------------------------------------------------------- // RESPOND TO KEYDOWN public wallmaker_kd() {     if ( !hasRoundStarted() ) return     // First Argument is an id with Wall Maker Powers!     new temp[6]     read_argv(1,temp,5)     new id = str_to_num(temp)     if ( !is_user_alive(id) ) return     if (wallmakerentity[id] > 0) {         plant_wall(id)     } } //---------------------------------------------------------------------------------------------- public plant_wall(id) {     if (!is_user_alive(id)) return     if (wallmakerentity[id] > 0) return     new walls = (get_cvar_num("wallmaker_walls"))     wallammo[id] = walls     if (wallammo[id] = 0) {         playSoundDenySelect(id)         client_print(id,print_center,"You have 0 walls left")         return     }         if ( gPlayerUltimateUsed[id]) {         playSoundDenySelect(id)         return     }         wallmakerentity[id] = CreateEntity("info_target")     if (wallmakerentity[id] == 0) return     Entvars_Set_String(wallmakerentity[id], EV_SZ_classname, "remote_wall")     ENT_SetModel(wallmakerentity[id], wallmodel)     new Float:PlayerOrigin[3]     Entvars_Get_Vector(id, EV_VEC_origin, PlayerOrigin)     ENT_SetOrigin(wallmakerentity[id], PlayerOrigin)     Entvars_Set_Int(wallmakerentity[id], EV_INT_solid, 0)     Entvars_Set_Int(wallmakerentity[id], EV_INT_movetype, 6)     Entvars_Set_Edict(wallmakerentity[id], EV_ENT_owner, id)     wallammo[id]--     client_print(id,print_center,"Wall Planted: You have %d walls left",wallammo[id]) } //---------------------------------------------------------------------------------------------- public client_connect(id) {     if (wallmakerentity[id]) {         RemoveEntity(wallmakerentity[id])     }     wallmakerentity[id] = 0     gPlayerUltimateUsed[id] = false     gHasWallmakerPower[id] = false } //---------------------------------------------------------------------------------------------- public client_disconnect(id) {     if (wallmakerentity[id]) {         RemoveEntity(wallmakerentity[id])     }     wallmakerentity[id] = 0     gPlayerUltimateUsed[id] = false     gHasWallmakerPower[id] = false } //---------------------------------------------------------------------------------------------- public wallmaker_levels() {     new id[5]     new lev[5]     read_argv(1,id,4)     read_argv(2,lev,4)     gPlayerLevels[str_to_num(id)]=str_to_num(lev) } //------------------------------------------------------------------------------------------------

Warning:

Code:
//// sh_wallmaker.sma
// superhero editing\scripting\sh_wallmaker.sma(110) : warning 211: possibly unintended assignment
Extremeone is offline
imported_FireWalker877
Member
Join Date: Jun 2004
Location: Memphis, TN
Old 03-12-2005 , 21:31  
Reply With Quote #3

I think you need == instead of = on line 110. = assigns == checks.
__________________
Get Your Free 60 GB iPod here: http://premiumipods.freepay.com/?r=21092500

^ea^ Superhero Domain: 24.145.238.133:27015
imported_FireWalker877 is offline
Extremeone
Senior Member
Join Date: Jan 2005
Old 03-12-2005 , 22:16  
Reply With Quote #4

ahhhh thanks, yeah that fixed the warning
Extremeone is offline
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 15:50.


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