New Code Error
/* Plugin generated by AMXX-Studio */
#include <amxmodx> #include <amxmisc> #include <Hamsandwitch> #define PLUGIN "SIMPLE HUD Message" #define VERSION "1.0" #define AUTHOR "Anonymouse" public plugin_init() { RegisterHam(Ham_Spawn, "player", "fwHamPlayerSpawnPost", 1) }a public fwHamPlayerSpawnPost(iPlayer) { if (is_user_alive(iPlayer)) { // player spawned print_center("YOU ARE RE SPAWNED,GOODLUCK! FOR THIS TIME") print_center("DON'T GET FUCKED UP THIS TIME,RETREAT HELL!!") } PLUGIN_HANDLED } Error: Cannot read from file: "Hamsandwitch" on line 5 What to do?? Will this code do anything?? |
Re: Error: Cannot read from file: "Hamsandwitch" on line 5
It's hamsandwich.
Also it should be: PHP Code:
|
Re: Error: Cannot read from file: "Hamsandwitch" on line 5
client_print(print_center "My message")
Error: Expected token: ",", but found "-string-" on line 23 If I add "ID",It says error about id... what to do now ? |
Script Compiled,But Now working
/* Plugin generated by AMXX-Studio */
#include <amxmodx> #include <amxmisc> #include <hamsandwich> #define PLUGIN "SIMPLE HUD Message" #define VERSION "1.0" #define AUTHOR "Anonymouse" public plugin_init() { RegisterHam(Ham_Spawn, "player", "fwHamPlayerSpawnPost", 1) } public fwhamplayerspawnpost(iplayer){ if (is_user_alive(iplayer)) { client_print(iplayer,print_center,"YOU ARE RE SPAWNED,GOODLUCK! FOR THIS TIME") client_print(iplayer,print_center,"DON'T GET FUCKED UP THIS TIME,RETREAT HELL!!") } else { client_print(iplayer,print_center,"SCREWYOU,Y OU'RE DEAD AGAIN") client_print(iplayer,print_center,"WAIT FOR RE-SPAWN") } } I have compiled this script with no errors but its not working. My plan was to show a message on respawn and on death,But not working. Any suggestions,This is my first simple plugin,Help please.......... |
Re: Error: Cannot read from file: "Hamsandwitch" on line 5
There's no point in putting the else and the part after it, it will only cause errors.
PHP Code:
|
Re: Error: Cannot read from file: "Hamsandwitch" on line 5
Please learn to use [CODE][/CODE] tags around your code when posting.
|
Re: Error: Cannot read from file: "Hamsandwitch" on line 5
In Ham_Spawn hooked as post, if the player is not alive, that means he's connecting (loading).
|
Re: Error: Cannot read from file: "Hamsandwitch" on line 5
Quote:
|
New Code
I have changed the code,But still it isn't displaying anything,Any mistake here?
Code:
/* Plugin generated by AMXX-Studio */ |
Re: New Code Error
It's because you changed the entity name for the hook, which will be erroring ... Change it back to what I showed you.
You need to change: PHP Code:
PHP Code:
Change: PHP Code:
PHP Code:
|
| All times are GMT -4. The time now is 00:21. |
Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.