headache - Printable Version +- Cuberite Forum (https://forum.cuberite.org) +-- Forum: Plugins (https://forum.cuberite.org/forum-1.html) +--- Forum: Plugin Discussion (https://forum.cuberite.org/forum-8.html) +--- Thread: headache (/thread-69.html) |
headache - Tim - 03-05-2011 Code: local iniFile = cIniFile("myfile.ini") heeeeeeelllppppp RE: headache - Revolucas - 03-05-2011 Is Player's name suppose to be a number? Also you don't want to check for data == true. That simply doesn't work. You want to make sure it isn't null or nil by: Code: if (not data) then Code: if (data) then In reality checking for true is like making something check if it is equal to one. RE: headache - Tim - 03-05-2011 (03-05-2011, 06:54 AM)Revolucas Wrote: Is Player's name suppose to be a number?that was when i was trying something else, needed to convert the data to a number, i guess i forgot to take it out thanks for the help, i tried everything you said and every combination of 'not' '==' etc and it just doesnt want to work :/ but im sure i checked the existence of data using GetValue() before... RE: headache - FakeTruth - 03-05-2011 You should not check data == true, data is never true, data is a number. However, tonumber can return nil if the given argument is not a number. So what you should do is check for nil instead of true. RE: headache - Tim - 03-05-2011 Problem solved, cheers for the help guys! |