Renegade Projects Network Forums
" Is not a valid Interger Value... - Printable Version

+- Renegade Projects Network Forums (https://forums.renegadeprojects.com)
+-- Forum: Strategy X Hostees (https://forums.renegadeprojects.com/forumdisplay.php?fid=21)
+--- Forum: DCoder's Coding Realm (https://forums.renegadeprojects.com/forumdisplay.php?fid=31)
+--- Thread: " Is not a valid Interger Value... (/showthread.php?tid=607)



" Is not a valid Interger Value... - Sonofabandit - 27.01.2007

This is a question for anybody who has the answer but I must say DCoder, I'm loving your AI Editor. It's an excellent program!

But about my editing mishaps... everything was going fine. But when I open up the program load the necessary files and go directly to the TeamTypes pages... this happens....

I try to create a new taskforce, script, teamtype, ect and save it it gives me this- " Is not a valid Interger Value. That's the error message verbatim.

I'm not sure how this is happening since I'm 100% sure I am not using quotation marks in my Taskforce/Script/Ect ID. And certainly I'm not using the same ID by accident or else I would get a "ID allready in use"...

Now here's the kicker... If I go to the New Trigger page and add a new trigger, then proceede to make a new task force for that blank trigger... it works. What principle of coding am I missing here?

Thanks for the help


RE: " Is not a valid Interger Value... - Renegade - 27.01.2007

An integer is what can be called a "whole number"; the error message suggests you are trying to enter something else, namely a floating point number. The " might also be two 's, indicating that maybe the inputed value is nothing - empty field. And "nothing", of course, would also not be an integer Wink

Logically, when you auto-generate a task force, the editor would fill in working numbers, so it's no suprise it's working there - I suggest comparing what you try to save to an auto-generated task force, and see if you use any points where the auto-force doesn't, or left any fields blank.


RE: " Is not a valid Interger Value... - DCoder - 27.01.2007

I'm sorry, I can't really help you there - that is the default error message when the code cannot convert a string to an integer (the language is pretty picky about that, and I was still a rookie at coding when I wrote it, so I didn't write a custom error handler for this). After looking at the source, I feel ashamed of it - the code is pretty hairy and it would be easier to rewrite it cleanly than to track down and fix all the little bugs like this. So I can't promise any quick fixes. I am, however, getting motivated to recode it from the ground up...

From the looks of the message, it found an empty string where it wanted an integer. I tried myself, and it seems that it doesn't like to save TaskForces when no TeamType is focused.