[ Enums Problem ]
I have problem on enums :/
See my code: PHP Code:
|
Re: [ Enums Problem ]
If you do that: p_Data[id][max_health] = 200
It means p_Data should be declared like: new p_Data[MAX_PLAYERS][p_DataColumns]; But you declare it with something else. |
Re: [ Enums Problem ]
Quote:
Could provide me an example? |
Re: [ Enums Problem ]
PHP Code:
client_print(id, print_chat, "New HP: %d", p_Data[id][max_health]) // Return New HP: 0 |
Re: [ Enums Problem ]
Add is_user_alive() in Player_Spawn. Ham_Spawn is called twice, just before you are put in server (you spawn the first time as a player entity, and later alive, after choosing team/class.
|
Re: [ Enums Problem ]
Quote:
PHP Code:
p_Data[id][max_health] is not returning 200 |
Re: [ Enums Problem ]
Attach your whole running .sma file so we can check it.
|
Re: [ Enums Problem ]
1 Attachment(s)
The enums works just fine, see this modified version of your plugin (that was changed to test the enum only). Therefore, issue is unrelated to the enum.
Your issue is the sockets. You cannot read from the socket in the same function as you send the socket packet out. The internet is not that fast. Look at the sockets tutorial for how to do it (I actually recently learned how to use sockets from that same tutorial also). |
Re: [ Enums Problem ]
i change public client_putinserver(id) to public client_putinserver(pid) and it worked.
How strange. Why? |
| All times are GMT -4. The time now is 15:17. |
Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.