MetaGamer Posted October 29, 2011 Share Posted October 29, 2011 I made a silly mistake on this code. Can anyone figure it out? local newZ = getElementData ( attacker, "Zombie kills" ) outputChatBox( "Total Zombies killed: " .. (string) newZ) The error is: [2011-10-30 01:41:46] SCRIPT ERROR: zombies\zombie_server.lua:339: ')' expected near 'newZ' [2011-10-30 01:41:46] WARNING: Loading script failed: zombies\zombie_server.lua:339: ')' expected near 'newZ' Thanks in advance! Link to comment
revivaL Posted October 29, 2011 Share Posted October 29, 2011 outputChatBox( "Total Zombies killed: " .. tostring( newZ ) ) Link to comment
Blaawee Posted October 29, 2011 Share Posted October 29, 2011 local newZ = getElementData ( attacker, "Zombie kills" ) outputChatBox( "Total Zombies killed: " .. (string).. " newZ) Maybe This Link to comment
bandi94 Posted October 29, 2011 Share Posted October 29, 2011 what is that (string) there? local newZ = getElementData ( attacker, "Zombie kills" ) outputChatBox( "Total Zombies killed: " .. newZ) Link to comment
MetaGamer Posted October 29, 2011 Author Share Posted October 29, 2011 I am actually a C# Programmer, so I thought of casting. But didn't know it doesn't work in LUA. Thank you Link to comment
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now